Hi,
I have a PDF which has some simple fields which are populated from a merge document (tab delimited txt file).
The issue I am having is that the barcode which is also on my form, is being set to the same value across each page (the second record from my file), where I require each page to have different barcodes using details obtained during the merge of each record.
I would really appreciate some help here, I am up against the wall and have tried to search the forums for assistance, but cannot get past this issue in my document.
Any help appreciated.
I am using Adobe Acrobat X
My PDF, JS file (which goes in C:\Program Files\Adobe\Acrobat 10.0\Acrobat\Javascripts), and data file are found in this zip file
http://dl.dropbox.com/u/8187787/Test.zip
Robin
1. On line 36 there is an if statement with this condition: (i=1)
Not going to work, this is an assignment statement. But its
not causing any problems, just an inefficiency in the code.
2. The fields in the template are renamed. The getField code must
use the new names. The right way to do this is to make the template
page invisible from the start. Spawn the template first, then
populate the field data.
3. Include a cover sheet for the doc so the new pages can be spawned
starting at page1.
3. Spawn all templates at (this.numPages-1),i.e., after the last page.
4. In a folder level function the keyword "this" is not guaranteed to be
the doc object. Pass the doc object into this function.
To get a feel for how this works, run your code in console window one line at a time. You'll be able to see exactly how the template fields are renamed and where the new pages are placed.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script