How to Add Sequential Page Numbers to Every Other Page in PDF
Question details
The user wants to apply sequential page numbers (1, 2, 3) exclusively to the first page of multiple two-page PDF documents without numbering the second pages.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- Combining multiple two-page PDF documents and numbering them sequentially based on their document order rather than the total combined page count.
- Observed behavior
- Standard PDF numbering tools count every physical page, resulting in odd numbering sequences like 1, 3, 5 on the target pages instead of consecutive 1, 2, 3 numbering.
Ensure you have Adobe Acrobat Pro installed, as the Action Wizard and JavaScript execution features required for this custom numbering are not available in standard or free PDF readers. Additionally, organize your individual two-page PDF files into a single folder and prefix their filenames with the desired sequence numbers (e.g., 001_file.pdf, 002_file.pdf).
Use Acrobat Pro Action Wizard and JavaScript
Process the files individually using a custom Action Wizard script before combining them into a single PDF document.
By running an Execute JavaScript step on a folder of uncombined files, you can extract the sequence number directly from the filename and stamp it only on the first page of each respective file. This prevents the software from counting the second pages in the overall sequence.
Launch Adobe Acrobat Pro, navigate to the 'Tools' menu at the top, and select 'Action Wizard'.
Click on 'New Action' in the toolbar. In the 'Files to be Processed' section, choose 'Add Folder' and select the directory containing your uncombined two-page PDF files.
Under 'Choose tools to add' on the left side, expand 'More Tools' and click the '+' icon next to 'Execute JavaScript' to add it to your action steps panel.
Uncheck the 'Prompt user' box. Click 'Specify Settings' and input a custom JavaScript code snippet that uses `this.documentFileName` to read the leading numbers of the filename, and applies an `addWatermarkFromText` function to stamp that number on page 0 (the first page).
Expand 'Save & Export', add a 'Save' step to the action, and click 'Save'. Name your action, select it from the Action List, and click 'Start' to process the folder. Once finished, you can safely combine the stamped PDFs.

Organize and Number PDF Pages Easily with WPS Office
WPS Office provides a comprehensive, lightweight PDF editor that simplifies adding custom page numbers, headers, footers, and Bates numbering to your combined PDF documents without the need to write complex JavaScript.
- 1. Open your PDF in WPS Office: Launch WPS Office and open your combined PDF document using the PDF editor.
- 2. Access Page Numbering Tools: Navigate to the 'Insert' tab and click on 'Page Number' or 'Header and Footer'.
- 3. Customize the Sequence: Set your desired page range and numbering format in the dialog box. You can choose to apply the numbering exclusively to odd or even pages, adjusting the layout to fit your specific document requirements.

Frequently Asked Questions
Can I add page numbers to specific pages only in a PDF?
Yes. Most advanced PDF editors allow you to insert headers and footers with page numbers applied only to a specific page range, or exclusively to odd/even pages, bypassing title pages or appendices.
Why does my combined PDF skip numbers when I add page numbers?
When you combine multiple PDFs, the software sequentially counts every physical page in the new document. If you stamp numbers only on the first page of every two-page section, it reflects their actual position in the combined file (e.g., pages 1, 3, 5) rather than 1, 2, 3.
What is Bates numbering in PDFs?
Bates numbering is an indexing method used primarily in legal, medical, and business documents to apply unique, sequential identification numbers or marks to each page. It is highly customizable and can span seamlessly across multiple PDF files.
Do I need to know JavaScript to number PDF pages?
No, standard page numbering does not require JavaScript. However, creating complex custom sequences—such as pulling numbers from filenames or numbering every other page with consecutive digits (1, 2, 3)—often requires advanced scripting like an Execute JavaScript action.




