These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

PDF Packages

MJF
Registered: Jan 18 2007
Posts: 33

Hi Thom
This is in regards to the question I asked you on Thur Feb 15th about PDF packages. You said that it is possible to have same name fields auto populate if the forms are done in acrobat, which they are. How do you go about creating a button on each form that would save the data inbetween files as you mentioned?
MJ

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Creating a solution for this requires writing a non-trivial set of interacting, multidocument scripts. The easiest way to do it is to place a button on each of the forms in the package that when pushed will update the other forms.

All of the package files are really embedded files in the Cover Document. So the main auto-populate script has to be in a document script of the cover document.

First you need a list of the common fields. This should be defined in a document script. The auto populate script loops over all the embedded files (Data Objects in JS speak) with an inner loop for the list of common fields. The inner loop finds and sets the field value based on the field value in the source document.

The easy part is running the autopopulate script from the cover document. It gets a lot more difficult for the embedded files since these files don't have direct access to the cover doc, or any of the other embedded files. You'll have to come up with a scheme for saving some kind of handle to the cover doc on each of the embedded files. An embedded file then uses the handle to open up the cover doc and call the auto-populate script.

Hope this helps, like I said, this is not an easy one.

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script