Skip to main content
Participant
April 24, 2019
Answered

Is there a way to add consecutive page numbers to every other page?

  • April 24, 2019
  • 1 reply
  • 4898 views

Hi,

I have over 200 PDFs -- each is exactly 2 pages -- that I need to number sequentially. Basically, a page number, but one number on the first page of each doc. The second page of the doc should either have no number or share the number of the first page.

My hope was that I could combine all the PDFs into one doc, then number them "odd pages only", but unfortunately this skips numbers for the even pages. Meaning, if I have PDFs A, B, and C, they end up being numbered A1, B3, C5, whereas I need A1, B2, C3.

Is there a simple way to accomplish what I'm looking to do? If it's any help, each filename contains the page number in the file name (first 3 characters on the left, eg 001 - xyz.pdf), so if there's a way to use filenames in adding a page number/header to a PDF, that would work too in my case.

Thanks in advance,

Simon

This topic has been closed for replies.
Correct answer try67

This looks great, thank you for taking the time to write it, but I may need a little help executing.

I consulted https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html, but it wasn't clear to me how to load the script (or if I need to combine all the files first, etc). All the files live in the same dir. Thanks again.


You should use this script in an Action. In Acrobat Pro go to Tools - Action Wizard and create a new Action that has an "Execute JavaScript" command and a "Save" command. Then edit the Execute JS command and paste the code into it. Make sure to tick off the "Prompt user" check-box next to it. Then save the Action and it should appear at the top menu. Click it, select your files, and run it on them. That's it!

1 reply

try67
Community Expert
Community Expert
April 24, 2019

This can be done using a script, and the fact that the file-name contains the number to use for the watermarking helps.
What version of Acrobat do you have?

Participant
April 24, 2019

Thanks for the reply!

For what it's worth, I'm reasonably tech-capabale/savvy, but don't program and have never worked with scripts for Acrobat, so if you could help with a script, I would really appreciate it.

I'm using Pro DC for Mac - v 2019.010.20099

Architecture: x86_64

Build: 19.10.20099.322322

AGM: 4.30.85

CoolType: 5.14.5

JP2K: 1.2.2.42832

try67
Community Expert
Community Expert
April 24, 2019

OK, that works. Where on the page do you want the text to appear, and what should it look like (font, size, color, etc.)?