I am looking for some advice on how to approach a slightly unusual sequential numbering workflow:
Our input data will contain a number for a total quantity of pages ordered. (50, 100, 1000, whatever.) What I need to do is then generate individual records for print, sequentially numbered, equal to the quantity ordered.
The catch is I also need to somehow remember the last sequential number printed and then start the next order’s numbering from that value.
For example, if the first order in is qty 50, then the print file generated should be 50 pages numbered 1 through 50. Then if next order to come through has a qty of say 100, then that print file will have 100 pages, with numbering starting at 51 through to 150, and so on.
Bonus points if we can pad the numbering with leading 0’s to 5 places too.
Hoping that this is possible to do with PP7 + Designer 7, appreciate any thoughts or guidance!
Also, could you explain what actually gets printed? I understand that if the batch value says 150, you need to print 150 pages, but 150 pages containing what exactly? (other than the sequence number)
I would still need the info I asked for to provide you with a better response, but I figured you might be able to get started with this template: Counter.pp7
It reads the size of the batch from the first line of data (50, in this sample).
The page named RunPage is where the magic happens:
It sets the initial counter to the value of JobInfo[9], which you can set in PlanetPress Workflow
It then runs a loop starting at that initial value and running for the length of the batch size
In each iteration, it calls the overlay page named MainPage
So essentially, you just need Workflow to set the proper value in JobInfo[9] prior to calling this document. To do that, you process could, for instance, read the content of a text file somewhere on your system that contains the next starting value for your next batch. Once you have output your document, the process could update that text file with the new starting value for the next batch.
Oh… and it shows how to pad the current counter with 0s, so I get the bonus points…
Thanks, Phil. I can totally use Workflow as part of this project & am planning to automate further at the end with folder inputs and outputs.
This product will be banking deposit slips.
Other than the sequence numbering, there are base PDF file’s containing all the static info/artwork, that must print on each record, along with the individual numbering on top of that.
Phil, thank you so much for this, you get all the points!
I’ll take a look at the file you’ve provided and let you know how it goes. this approach sounds promising!
In your process, use the Load External File plugin, followed by a Set Job Infos and Variables plugin. In that plugin, select the %9 jobinfo in the left column, then in the right column, right-click and select Get Data Location, which brings up the data selector for you to select the value from your data file.
Thanks Phil,
I’ve almost got this working now, except the numbering output is always short by 1 page. Ex: BatchStart = 101, BatchSize = 200. Last number printed should be 301, but the last page in my output file is numbered 300.
No. If you start at 1 and have 100 documents, then your documents are numbered from 1 to 100. If you start at 101 with a batch of 200, then the last number must be 300.