Advertisement


Unique serial number on page each time a pdf or indesign doc prints


Question

I have to design a document for internal use that needs a unique serial number on copy of the sign off sheet.

I'm aware that InDesign has a numbering function (to number book/magazine pages) but what I'm looking for is something that's a but smarter than 1,2,3,4... I need it to put out a serial number mixed of letters and numbers preferably adhering to a set pattern.

Is there a way one can insert a variable into a pdf or InDesign doc so that each time it's printed it will print a unique serial number onto that page?

The only other way I could think of doing this was to make a web page html/php and have the serial number done on the server and the print page styled with a print style sheet. But this seems like a rather long way to go around the issue.

2015/04/03
1
3
4/3/2015 3:57:00 AM

I separated my answers because they're very different approaches.

Make a script that you can run before you print. How it's structured will really depend on how you want to use it. But if it's a sign-off sheet, I'll run with the assumption that this is one page where you have one text frame that you could update with the unique ID.

Make the text frame and name it by going into the Layers palette and doing a slow double click on the text frame name listed there. Then, find a place to store some data. This could be achieved by an external plaintext or XML file, or you can store within the document if you're only using one document. But if you want to have a format that's signoff-1, signoff-2, signoff-3, then put 1 in that label to start. Have the script pull the value and insert into your text frame, add one to the value, then store the new value. Run the script before you print.

You could generate and place the text frame via scripting as well. You could store multiple values as well to make the convention more complex. So if you had ssanders, djenkins, and dgreen, you could assign a value of 1 to each and then have a script that puts the usernames into a dropdown. You pick the user and then pull their value, so you'd get signoff-djenkins-13.

There's a world of options that open up when you start scripting InDesign!

2012/12/13
1
12/13/2012 3:41:00 PM