How to Stamp Exhibit Page Numbers in Acrobat PDFs
Question details
The user needs to stamp large legal PDF documents with sequential exhibit labels and page numbers, such as "Exhibit 1, page 1 of 1000", and requires a reliable method for documents exceeding 100 pages.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Preparing and formatting large legal PDFs where specific exhibit labels and total page counts need to be stamped reliably.
- Observed behavior
- Looking for an automated script or tool that ensures page numbering beyond 100 pages is properly calculated and formatted without truncating or overwriting text.
Before applying bulk page numbering or running custom JavaScript, create a backup copy of your original PDF document to easily recover your file if the formatting does not apply as expected.
Use Acrobat Built-in Header & Footer or Bates Numbering
The most reliable way to add exhibit labels and page numbers without writing custom scripts is by using Acrobat's native numbering tools.
Adobe Acrobat natively supports complex pagination such as "Page X of Y" alongside custom text prefixes. This method handles PDFs with thousands of pages flawlessly and avoids the truncation issues sometimes encountered with basic scripts.
Open your PDF in Adobe Acrobat Pro, navigate to "Tools" > "Edit PDF", and select "Header & Footer" > "Add".
Click into the desired text box (e.g., Right Footer Text) and type your exhibit label prefix, such as "Exhibit 1, page ".
Click the "Insert Page Number" button, type " of " manually, and then click "Insert Number of Pages" to complete the sequence.
Adjust the font size and positioning margins as needed, then click "OK" to stamp the entire document automatically.

Apply Custom JavaScript for Exhibit Numbering
If you require a programmatic approach to stamp multiple files simultaneously, you can use an Acrobat JavaScript snippet.
Easily Add Exhibit Page Numbers with WPS PDF
WPS PDF offers an intuitive and fast way to insert custom headers, footers, and complex page numbering for large legal documents without needing to write custom scripts.
- 1. Open your Document: Launch WPS PDF and open the legal document you wish to stamp.
- 2. Navigate to Header and Footer: Go to the "Insert" tab on the top ribbon and select "Header and Footer", then click "Add Header and Footer".
- 3. Insert Custom Text and Page Count: Type your custom text (like "Exhibit A, ") in the appropriate footer box, and use the quick buttons below to insert the current page number and total page count.
- 4. Apply to Document: Click "OK" to apply the formatting across all hundreds or thousands of pages instantly.

Frequently Asked Questions
Why does my Acrobat JavaScript truncate page numbers after page 99?
This usually happens if the script handles the page variable as a limited string rather than a mathematical integer. Ensure your JavaScript formats the page loop index properly as a number before converting it into text to be stamped.
Can I format page numbers as "Page X of Y" natively without scripts?
Yes, both Adobe Acrobat and WPS PDF allow you to insert "Page X of Y" formats directly through the Header & Footer dialog box by combining custom text with built-in page number macros.
What is Bates Numbering used for in PDFs?
Bates Numbering is an indexing method used primarily in the legal profession to assign unique, sequential identification numbers or alphanumeric prefixes to every page of a multi-page document for easy reference and retrieval.




