Skip to main content
Known Participant
October 8, 2020
Question

merging PDF Form fields

  • October 8, 2020
  • 1 reply
  • 1200 views

I have a PDF document with form fields that is 3 pages long. I have considered this my "Template". However, some users may need this template to extend up to 17 pages long sometimes and when I merge another page of course it duplicates because the form fields are the same name. How can I add similar pages but not have two particular form fields duplicate?

This topic has been closed for replies.

1 reply

Inspiring
October 9, 2020

You can create template pages in a PDF using Acrobat. A template is really nothing more than a named page, and you have the option of hiding a template page (unless it is the only page in the document). Using JavaScript, you can add a new page to the document that is a duplicate of a template page using a process known as spawning a template. When you create a new page by spawning a template, you have the option of renaming the fields so that the fields on each added page are unique. The naming of the new fields fields follows a convention that is documented in the Acrobat SDK: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_Dev_Templates%2FDynamic_form_field_generation.htm

Traci5FC3Author
Known Participant
October 9, 2020

George,

The original file is a 3 page document and I want the last page to be a dummy that can be added if the user needs this document to more than 3 pages by just adding more pages.  However, the body form field needs to be editable and not duplicate from what I copied.  I am not sure if I need a template object or javascript for this action to occur. The users need to just be able to click and have pages inserted at the end as needed.

Inspiring
October 9, 2020

That's exactly what template pages and the associated JavaScript allow. Note that you can build a single new page by spawning multiple temlpate pages. This comes in handy when certain fields should be unique to the newly added page, and others need to be the same as others in the document. The documentation that I linked to above has more information and sample code, but if you get stuck, post again.