Sequential numbering with leading zeros

Post Reply
strido
Member
Posts: 32
Joined: Tue Jan 19, 2016 7:02 pm

Sequential numbering with leading zeros

Post by strido »

Pretty much what it says...

I'm not sure if this is a Switch thing, or is it strictly PitStop Server?

I'd like to add sequential numbering to my document, and have it always be 5 digits. So 00001, 00011, etc...

I see the page numbering action list, but it's not clear how to add the leading zeros.
Thanks!
strido
Member
Posts: 32
Joined: Tue Jan 19, 2016 7:02 pm

Re: Sequential numbering with leading zeros

Post by strido »

Actually I found an action in PitStop but as it turns out, this is going to be more involved.

I'll get say 5 files for the same batch, because one file will be too large to transmit. So the beginning of File 2 has to be a direct continuation of the end of File 1, and so on.

I wonder what a workflow that can accommodate that would look like.
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Sequential numbering with leading zeros

Post by gabrielp »

Do you want to add the numbers to pages of a PDF? Or if you have a folder of 10 PDFs, you want to get numbers for each PDF? What do you want to do with the numbers? Imprint them on the page or rename the file?
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
strido
Member
Posts: 32
Joined: Tue Jan 19, 2016 7:02 pm

Re: Sequential numbering with leading zeros

Post by strido »

I'll be adding the numbers to the PDF. I found the PitStop action to do it, but now I'm stuck on how to continue the numbering across 2 or more files.

The filenames will have the package ID number in them - like XXX_12345_092816_1of3, XXX_12345_092816_2of3, XXX_12345_092816_3of3, etc. 12345 being the unique package ID.

The first one would go from 1-200 for instance, and the 2nd one would have to go from 201-400, etc....

Sounds like a job for scripting, or metadata?
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Sequential numbering with leading zeros

Post by gabrielp »

So each PDF has 200 pages and you want each page to have a sequential number? For instance, pdf A has 100 pages and pdf B has 150 pages. You want to sequentially add a number to each page with numbers 001 to 250, with the last page of pdf B having number 250. Is that correct?
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
strido
Member
Posts: 32
Joined: Tue Jan 19, 2016 7:02 pm

Re: Sequential numbering with leading zeros

Post by strido »

Yes, PDF B would start at 101 and go to 250.
PDF C would start at 251...etc.
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Sequential numbering with leading zeros

Post by gabrielp »

I see. Well I'm not the best person to ask about modifying PDFs or Pitstop, but you could do this in a script. Perhaps assemble the PDFs together in a folder with their package ID, then pass that job folder into your script. Your script would then loop through the files, keeping a counter in a variable, then append the variable in each page using PitStop or something similar.

Sounds tough, but I'm sure it can be done. If you want to go this route and aren't familiar with scripting, I'd consult someone who knows PitStop or PDF Constructor. Maybe Dwight from Apago?

Another option, which would not involve scripting, would be to break apart the PDFs into per page PDFs, append the number, and then merge them back together again. This seems tricky and you'd have to increment on a global variable to accomplish this I think...
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
strido
Member
Posts: 32
Joined: Tue Jan 19, 2016 7:02 pm

Re: Sequential numbering with leading zeros

Post by strido »

I think I'll see if they can tackle it on the next Webinar.
Some of these can get pretty big - we had one that consisted of 66 files, each file had 3,000 pages. So it can get pretty funky.
_olq
Member
Posts: 36
Joined: Fri Aug 23, 2013 10:21 am
Location: Poland

Re: Sequential numbering with leading zeros

Post by _olq »

Hi,

You could also do that with Acrobat function: "Bates numbering".
If you point a few files, each of them will be numbered continuously, and next use a Action wizard for automation.

Best,
Aleksander
Aleksander
Post Reply