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

Printing Sequential Page Numbers on Printed PDF pages

MacHammer
Registered: Jan 2 2007
Posts: 2

Greetings,
 
I have an odd situation that requires me to print consecutive page numbers on printed documents, but not in the usual sense. We need to print 50 copies of each page in a multi-page PDF file, but each printed form must have a unique number printed at the top of the page. So, I print 50 copies of page 1 of my PDF, I need to number them sequentially from 1 to 50, then move to page 2 and print 50 copies, numbering them sequentially from 1 to 50, and so on. I need to find some way to make this automatic, as the number of pages in this project document could exceed 5000 pages. I would than want to send the document to print using variable data on each page consisting of this sequential number. My available tools: Acrobat 7 Professional.
 
My goal is to try to add these sequential numbers in one pass--not printing the PDF once, and then printing the page numbers in a second pass.
 
Please share any thoughts you may have on how to achieve this.
 
Thank you in advance for your time and effort!
 
Mac Hammer

My Product Information:
Acrobat Pro 7, Macintosh
leonardr
Expert
Registered: Feb 14 2006
Posts: 333
You can do this by writing some Acrobat JavaScript.

Leonard

Leonard Rosenthol
PDF Standards Architect
Adobe Systems

groendykm
Registered: Mar 20 2008
Posts: 1
I am looking to do something similar to what MacHammer is trying to do. Do you have any more detailed suggestions or somewhere to find the JavaScript required to perform this function?
mjbl
Registered: Apr 2 2008
Posts: 17
I too need to know how to do this. Please respond.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Please view the Acrobat Forms tutorial on this site.

You sould have a copy of Acrobat Professional to create form fields with the Form Field tool or be very good at programing to add fields and rotate as necessary using JavaScript.

Get te [url=http://www.adobe.com/devnet/acrobat/javascript.php]JavaScript for Acrobat Documentation[/url].

You may also want to read select [url=http://www.acrobatusers.com/tech_corners/javascript_corner/index.php]JavaScript Corner[/url] articles by Thom Paker about locations of scripts and printing.

George Kaiser

gm
Registered: Oct 31 2006
Posts: 1
I see users with honest questions (the same that I have)

I see "experts" that don't answer questions and send users scurrying to links to nowhere.

They asked how to get sequential numbering within Acrobat. Nobody asked how to learn Java or C++, etc. If the solution is in forms, please explain how.

If you don't have a concrete answer, don't respond.

my 2cents
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
If you want to do custom type actions in Acrobat/LiveCycle Designer you will have to write special code.

To add page number you will need to create a uniquely named form field on each page and then add the necessary JavaScript to fill in the value of the field or assign the number by hand.

var inch = 72;for (p = 0; p < this.numPages; p++) {// Position a rectangle (.5 inch, .5 inch)var aRect = this.getPageBox( {nPage: p} );aRect[0] += .5*inch;// from upper left hand corner of page.aRect[2] = aRect[0]+.5*inch;// Make it .5 inch wideaRect[1] -= .5*inch;aRect[3] = aRect[1] - 24;// and 24 points high// Now construct a text field for page pvar f = this.addField('p' + i ".pageNum", "text", p, aRect )f.delay = true;f.borderStyle = border.s;f.textSize = 0;// Auto-sizedf.textColor = color.black; // blackf.textFont = font.Arial; // fontf.readonly = true; // can not changef.value = p + 1; // add page number adjusted for zero basef.delay = false;}

HTH

P.S.
Have you looked at [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=18944]Autofill: Contents of two fields merged into a third[/url]? Be sure to follow the links.

Not bad for a person who had no computer in college because PCs did not exist then, just a big room with big iron. I had to learn to keypunch and write code years after graduation and PCs still did not exist.

George Kaiser

mjbl
Registered: Apr 2 2008
Posts: 17
I've read the entire post, however, I have not followed the links yets. I am very new to designer and do not know about codes. I was wondering if the code you supplied is just for printing sequential page numbers or will it also increment +1 and retain the last number assigned so that every form is unique. The forms are currently housed in a Lotus Notes database and used by over 300 + users. Every form has to have a unique number. Is this possible in Adobe Designer 7.0?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
The script is adding a new form form field on each page and displaying the page number of the page on each page. The control limit for the loop through the pages is the total number of pages ('this.numPages') and the dispaly of the page number is based on the documents pape number (this.pageNum'), this number is zero based so I have to add one to this number.

It sounds like you are looking of a Bates (the company that makes sequenctial nubmering stamps) Numbering solution. Acorbat now provides Bates Numbering, but I do not know if this will work with LiveCycle Designer forms. There can be significant problems with the application of this number. So you should test what ever solution you find.

George Kaiser

mjbl
Registered: Apr 2 2008
Posts: 17
Thanks for the reply. I search else where.