Spawn page, PDF template in Adobe X

Hi all, I am working on a PDF form where the user needs to be able to add more pages if they still have info to enter.  After researching this a bit, it seems the best way to go is to define the page as a PDF template, then copy that template to a new page when the user presses a button (using javascript). I am not a programmer at all, but I found this forum post: http://acrobatusers.com/forum/javascript/duplicate-current-page-5-times
That gave me some code to work with, but the code doesn't work for me, even with the corrections and taking out the comments.  Any advice on how I can do this?? Thanks to anyone who responds.  Here is the code I am currently working with:
function CopyPage(nPageNum, nTimes) {
   // create template from pagevar
   t = this.createTemplate({cName:"myTemplate", nPage: nPageNum });
   // hide
   templatet.hidden = true;
   // spawn nTimes pages from templatevar
   t = this.templates;
var T = t[0];
   // get first templage
   for (var i =0; i < nTimes; i++)  {
      T.spawn({nPage: this.numPages, bRename: false, bOverlay: false });
   // remove the template
   this.removeTemplate({cName: 'myTemplate'});
   return;
} // end CopyPage function 
// code to call CopyPage functionCopyPage(5, 1);

You cannot use the createTemplate method in a script that's attached to a button. You would have to create a folder level script, or better yet, make the page a template at design time so you don't need to do so at run time. If you know in advance that you want to possible create a new page, this is what you should do.
Also, when spawning a new page with fields, you should set the bRename parameter to true. Otherwise, the values of the fields on the different pages will be the same, which is probably not what you want.
Let's say that you made the page on which your button is a template, and gave it the name "myTemplate". A Mouse Up script that would add a single duplicate page after it would be:
// Get a template object from an existing template
var t = getTemplate("myTemplate");
// Spawn the template on the page following this one, and rename the fields
t.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});

Similar Messages

  • Enable spawn pages from template

    Hi all,
    I have a fill-in PDF form (created in Acrobat Pro X) that uses a javascript button to duplicate pages (spawn pages from template).  We got a trial version of LC Reader Extensions ES in order to enable the button to function in Reader.  The problem is, as I understand it, when our evaluation period runs out, the button will stop working in Reader.  Is this true?  The form will be distributed to LESS THAN 500 people- we just want this button to work for everyone.  Is there another way to enable users of Reader to spawn pages from template?
    I don't believe that purchasing the software is an option, as the Adobe Rep on the phone said it would be $10,000 per form. Any help is greatly appreciated.
    Thanks!

    Sorry, but the functionality you are looking for is not available with the limited Reader Eextensions capability available within Acrobat.  Reader Extensions has a set of rights, and the following rights are available only through the server product (LiveCycle Reader Extensions).  These specific rights are:
    2 - Form Data Import/Export
    5 - Spawn Pages from templates (for PDF page forms, as opposed to XFA dynamic forms)
    9 - Barcoded form data unencrypted
    10 - Browser-based annotations (note that this capability is being deprecated for use with Reader)
    11 - Web services or ODBC access from the form
    12 - Embedded File actions
    [Acrobat enables basic form fillin, signatures, and annotations, as well as the ability to save the document after the data fillin or action has been done]
    In your case, you either need to get a LiveCycle Reader Extensions license or move yourself to LiveCycle Designer-based forms where dynamic forms may do what you'd like.
    I'd suggest a deeper discussion with your salesperson.

  • Problems Viewing .pdf Template Created with Adobe

    I created a .pdf template using Adobe LiveCycle Designer. After I upload this template, I can not view the report. Can I only create templates using the BI Publisher plugin for MS Word?

    That is hardly a solution, the whole purpose of upgrading to Adobe Reader X is to avoid potential threats.  There is obviously a problem with Adobe Reader X and veiwing certain documents that needs to be addressed and the way to address it should not reside with "Use Adobe 9 and Adobe 10 and pick whatever version works for your document"

  • Creating multiple page files from PDF templates

    I have a PDF file that is 3 pages. When I create the 3 page template form through Acrobat 8 Forms,  and then it is placed in Lifecycle designer, I can save it. All of the fields that I create remain in the file. But, I cannot add another page (PDF template)  to this Lifecycle file. I have to go back to the original PDF file, add the page, and then import back into Lifecyle, and add back all of the fields. Can I just save a text file with the correct XML code, and then paste it back in after I add another page. I tried it, but didn't have much success.

    Yes it is possible,
    All you need to do is create 3 destinations each of type Flat file.
    For your data target link to the and Open Destinations1, link by creating a transformation. and while create DTP use filter A.
    Again for your data target link to the another Open Destination2, link by creating a transformation and while creating DTP use Filter B.
    similarly for Open Destination3,  use Filter C.
    Regards,Vj

  • PDF templates

    Hello All ,
    I was going through various material available on net on BI Publisher and come across examples where the template was being built in PDF directly instead of doing it in Template Builder in words.
    I have a doubt in this regard.Can we design templates directly in Acrobat in PDF.Is this available in current version of BI Publisher 10.1.3.4 ? Or designing them in BI publisher desktop and then seeing the output in PDF format is the only way to go if you want to see your report in PDF format.
    Please share your view on this.
    Thanks!!

    Hi,
    PDF Templates are available for a long time.
    You can use existing PDF documents with form fields (depending the pdf-version) or you can built your own PDF-Templates with Adobe Professional.
    The result of a PDF-Template could only be PDF.
    So PDF-templates are an option if
    - there's an existing document you want to fill with data
    - you want an extrem professional design
    Regards
    Rainer

  • Adobe Acrobat as a server to create PDF using PDF templates and field values

    I'm writing a web page to create a PDF using fields that we ask for them in the screen.
    My idea is:
    1. Ask for field values (text values and a photo) in my web
    2. Run Adobe Acrobat to load a PDF template (PDF form) and mix with the field values
    3. Create a final PDF mixing values and template
    4. Show to document to the user in his client web browser. I guess the only way to do that is to create the PDF on a server with Adobe Acrobat Pro and send to the user browser a JPEG that will represent the  PDF: If I do this operation in the PDF visor at the client browser, the problem is that it will will be mandatory to install Adobe Acrobat in each cliente because only this visor can manage javascript.
    Can you tell me if this idea is correct? It is possible to use Adobe Acrobat on a Server to create PDF when some proccess needs?

    and what other Adobe product o procedure can we use to do that?
    I only need to create a PDF mixing PDF Templete, field values and javascript.
    Thanks for your help.

  • I've created a PDF form using Adobe acrobat. I created the forms from a PDF that I made using pages

    I've created a PDF form using Adobe acrobat. I created the forms from a PDF that I made using pages and word on Mac running Mountain lion. How do I allow the user of the form to insert JPEG files when filling out the form and how do I allow the user to add more fields or groups of fields as needed.

    The type of form yo're describing is possible if you create it in LiveCycle Designer. It may also be possible in Acrobat, but there are certain restrictions. The type of form is known as a dynamic XFA form. LiveCycle Designer is not available on the Mac, so you'd have to install the software on a Windows machine and learn how to create this type of form. The LiveCycle Designer forum here is a good resource for getting more help.
    Reader 11 now supports creating new pages using templates with a form that you create in Acrobat (Acroform). This requires some JavaScript programming. It also adds support for using a button to display a page from a PDF, which can be an image or anything else a PDF can be. So the user would click a button, be prompted to import a page from an existing PDF, and the button (or a different button) displays it as its icon. This would require the user to convert the image to PDF first, which is relatively easy these days (e.g., using Preview on the Mac, or Word on Mac/Windows). This too involves a bit of JavaScript programming, but it's very simple and straightforward.

  • How to take parts of a web page and feed into a PDF template to create a PDF

    Interesting quesiton that I think was what LiveCycle was for: How can someone take parts of a web page or xml document (say by id name or a specialized tag) and feed the chosen items into different regions inside a PDF template?
    Basically, can you identify areas on a page and then tie them to place holders in a pdf template (with high res graphics say) and create a PDF?
    Please note: this is not about converting a whole webpage to a pdf, but select portions of it.
    Anyone have experiences in doing this? So far, it appears to require a toolset like LiveCycle or Adlib to utilize only selected items and not the whole page.

    The lack of answers is likely due to folks having no clue. What you have asked is not really the purpose of either Acrobat or LiveCycle, but that is not to say it can not be done. A starting point is to bring a WEB page into Acrobat as a PDF. This can be done by printing from the browser to the Adobe PDF printer, using PDF Maker with IE or FIrefox, or simply creating directly in Acrobat. Those are the normal ways to get things from a web page to a PDF.
    That said, it is not what you asked. You are asking about being able to parse parts of the web page. That is a lot more work and may not be directly possible, though with JavaScript it might be possible. I suspect that if it is possible you would require a lot of extra programming to allow the material selection. It may be the folks in the SDK sub-forum can help.
    Being I have no clue how to implement what you have asked (and probably no one else either), I can only suggest some things to look at or other places to inquire. If you think the XML of LiveCycle would help, then you might try the LiveCycle forum.
    In terms of your post, I really don't remember seeing the original, but that was right near the end of the semester and I was not checking the forum very much. There are various reasons folks may not reply, typically because they have no clue. Templates are also somewhat specialized and there are not many posts about them. My guess is that the template aspect may have had a lot of folks skip the post. In any case, I have tried to give you some thoughts.

  • PDF template : how to have a multiple pages repeating field group

    Hello,
    I'm trying to create a PDF template.
    My problem is that my repeating field group is composed of 2 pages, so what my request has to generate will be N * 2 pages.
    But when I put the <?rep_field="BODY_START"?> and the <?rep_field="BODY_END"?> on two different pages, I can't generate the output.
    It looks like those BODY_START and BODY_END has to be on the same page.
    Could anyone confirm and/or provide help regarding my issue ?
    Thanks in advance.
    Regards,
    Nicolas

    Nicolaus, it appears as if Oracle is not willing to support templates generated using Adobe. They give us over a hundred pages on how to define an rtf template and then spend a measly 15 pages on PDF Templates. I have been successful in creating their example using the PO in the User Guide, but unsuccessful in repeating the outer group(which they don't tell you how to do or provide examples). So in summary you can print one PO at a time and the feature works great, but try to print more than one and you are screwed. Maybe it is time for someone from Oracle to make a post and make a believer out of all of us.

  • While creating a PDF document usinf Adobe Acrobat Pro 9, it generates additional blank pages.

    While creating a PDF document using Adobe Acrobat 9 Pro, it generates additional blank pages. How do I resolve this issue?

    I might make a wild guess that you are using WORD and have used hard page breaks. If that is the case, then likely what happens is when you print to PDF the document is being reflowed to match the printer and the forced page break may end up on the next page and be forcing a second page. Just a guess.

  • First page only when opening PDF (interactive) in Adobe Reader on iPad.

    Hi,
    I am having trouble opening a pdf document in Adobe Reader on iPad.
    All software is up to date.
    I created the interactive document in InDesign CS6.
    Due to the fact that InDesign cannot export directly to PDF when you want to keep certain functions such as 'Go to page', I used the workaround of exporting to .swf file, loading this in Adobe Acrobat Pro, and exporting as PDF from there.
    The PDF is fully functional and works perfectly on Mac and PC.
    I added the Adobe Reader app to iPad.
    I opened the iPad in iTunes on the Mac, went to the Adobe Reader app, and added the PDF.
    The PDF shows up in Adobe Reader on the iPad.
    Upon opening the PDF, only the first page shows, and none of the buttons work. The file size is correct and so the whole file 'should' be showing.
    Whats going wrong?
    Does Adobe Reader for iOS allow interactive PDFs?
    Also, on a side note, I tried first adding the PDF's using Dropbox, but the 'share' icon in the Dropbox App did not update to include 'Adobe Reader' as an option, having installed Adobe Reader App. It should be there, shouldn't it?
    Hope you can help!
    Thanks,
    Zeen

    Thanks Steve, but I had tried GoodReader earlier and that made no difference. This led me to think that it was something to do with what functions I was trying to have in my interactive file rather than limitations of a PDF reader App.
    It is a bit disappointing, however, that Adobe's own app doesn't support interactive PDFs!
    What I have now done is using InDesign CS6 Folio Builder panel and DPS to convert my interactive document into a .folio. I signed up to acrobat.com and then I was able to upload the .folio to my DPS cloud. On the iPad, I downloaded Adobe Content Viewer (care when searching the app store it's actually called Adobe® Content Viewer). Next I opened the App and it did a sync with my DPS cloud and now the PDF works with full interactivity on my iPad.
    It was free to publish a personal-use .folio using the DPS Folio Producer. ^_^
    I think that I might have been better from the outset creating my  document in InDesign, then exporting as high quality print PDF to Acrobat to add buttons and functionality (instead of creating the  buttons etc. in InDesign itself), then I have a feeling GoodReader would  have been able to read that PDF fine. Regardless, today I created my first working .folio file and have learned a new skill in Adobe =]
    The only problem I'm now having is that some of the images in the .folio are poor quality (I think ones that were link files to the original InDesign CS6 document), however this is not for this forum.
    I wonder if anyone else has been trying to do the same as me. What was your method, if successful?
    Ciao,
    ZZ

  • How to setup a four page PDF in Adobe Acrobat 9 Pro to print only one of four pages?

    Hello,
    I have a request from a end-user to setup a four page PDF in Adobe Acroat 9 PDF to only allow printing of one specific page of the four page PDF.
    The end-user will abe able to view the four pages in the PDF - however - the PDF would only allow printing of one page.  The PDF would need to be pre-set for the end-user.  Is there a setting Adobe Acrobat 9 Pro to allow this type of specific pre-set printing.
    I appreciate your help.  I hope to hear from you soon.

    No, Acrobat can't do that.

  • How to save selected pages of a PDF file in Adobe 11.0.07

    I upgraded to Adobe XI version  11.0.07.
    Example:
    I have a 100 page PDF and I want to save a portion of the pages:
    Pages 49-57 of the 100.
    Is there a way to do that, I cannot seem to get it to do it, I think Adobe 9 it was possible
    Thanks

    Hi tanasiluv,
    Please check the video: http://tv.adobe.com/watch/learn-acrobat-xi/extracting-pages/
    to know how to extract pages from a pdf and create new pdf using Adobe Acrobat.
    Regards,
    Rave

  • Safari 7.0.6, using Adobe Acrobat 11.0.10, aren't rendering pdf files in the Print Preview screen.  Additionally, only a single, blank page prints for a multi-page pdf document.  Any ideas?

    Safari 7.0.6, using Adobe Acrobat 11.0.10, isn't rendering pdf files in the Print Preview screen.  Additionally, only a single, blank page prints for a multi-page pdf document.  Any ideas?

    Figured it out.  It had nothing to do with the software levels of Safari or Adobe Acrobat.  Here's the fix:
    Open Finder/Applications
    Search "Internet Plug-Ins"
    Move any Adobe plug-ins to the trash
    Quit Safari
    Launch Safari
    Your pdf document should now render in Print Preview and print properly.

  • Place Single Page PDF Multi Times into a template

    Say for instance I have a Business Card 90 x 55 which needs to be placed on a 8up layout template ready for printing.
    How do I tell Indesign to place the single page PDF 8 times.
    Or maybe this way: Is there a way of telling Indesign to export a single page 8 times to the same pdf file. Size is not an issue for the PDF as it is only a tempary file.

    I have set up a template with Place holders for the pdf to be placed in, then to place the pdf all i have to do is click inside each of the place holders and wala they are there.
    So on my 8up template i have all my required items ie: colour bars, crop marks, and guides all on their own layers, and the 8 boxes on their own layer, I import the PDF loading my curser, click on a box and artwork is placed exactly where I need it to be.
    You are right about step and repeat being one way of doing this, but I think my way if I can work it out will be even faster, no mesurements to remember no typing just 8 quick clicks.
    If by any chance I need more then 8 up adding a page is no problems the boxes are on the master page and I just release the objects on the artwork layer and its ready to go again as many times as I need it.
    What do you think of the idea to Print to PDF is this a lower quality way of making the PDF.

Maybe you are looking for

  • Migrating from Crystal Reports Charts using TopN and "Other" to Reporting Services

    I am currently migrating several Crystal Reports that have charts.  The chart series is set to use the TopN values in a count, and combine the rest of the series into one series titled "Other".  I see how to filter the chart using TopN, however I nee

  • Save Formula Fields

    Is there a way to save a formula field for future use? For example, I create a formula field that I will need to use on various reports. Do I have to recreate this formula field for each new report? Or can I save it for future access on the new repor

  • How to echo the first line???

    Hi everybody, I need to know how to echo the first line of an XML document with a SAX parser, for example : <?xml version="1.0"?>I've already tried : public void processingInstruction(String target, String data) throws SAXException {         System.o

  • Weblogic Assertion Error

    Hello, I have run into the following problem. When running a very long lasting bean transaction on one BEA Weblogic 6.1 SP2 application server I get no errors, but on the other one that in fact should be quite similar to the first one, I get: EJB Exc

  • Authorisation, tabs and pages ?

    Hi, What would be the best way to restrict some pages and tabs to some users. I have tabs 1,2,3 and 4. I have pages 1,2,3 and 4. Admin user should have access to tabs and pages 1,2,3 and 4, but regular users should only have access to tabs and pages