How to Add File Names and Restart Bates Numbers for Each PDF
Question details
The user needs a method to apply advanced Bates numbering to legal exhibits that combines a file name, a custom prefix, and a sequential page number that resets to 1 for every new PDF document.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Preparing large batches of legal documents and exhibits that require strict court-mandated stamping conventions (e.g., TX1234-0001, TX1235-0001).
- Observed behavior
- Standard Bates numbering tools generally apply continuous sequential numbering across an entire batch of files to prevent duplicates and cannot natively extract individual file names to restart the count per document automatically.
Ensure all your PDF files are already named exactly according to the exhibit prefixes you intend to use (e.g., TX1234, TX1235) and back up your original un-stamped documents before running any batch processing.
Process Each PDF Individually with Custom Prefixes
The most reliable native method is to handle each file separately, allowing you to manually set the prefix to the file name and restart the sequence.
Standard PDF editors are designed to apply continuous Bates numbering across multiple files to ensure uniqueness. To restart the sequence and use specific file names, you must configure each document individually unless you use advanced scripting.
Launch your PDF editor and open the first legal exhibit file you need to stamp.
Navigate to the 'Tools' menu, select 'Edit PDF' or 'Pages', and click on 'Bates Numbering' to add a new sequence.
In the Bates formatting dialog, enter the specific file name (e.g., 'TX1234-') as the prefix. Set the starting number to '1' and adjust the number of digits to meet your formatting requirements (e.g., '0001').
Save the document with the newly applied Bates numbers. Repeat this manual process for each subsequent file, updating the prefix to match the new file name each time.

Use Custom Scripts or Legal Stamping Software
If you have a massive batch of legal exhibits, use specialized legal software or custom action scripts to automate the file name extraction and sequence reset.
Easily Manage PDF Pages and Custom Numbering with WPS Office
WPS Office provides robust PDF editing tools, allowing you to insert headers, footers, page numbers, and custom text to your legal documents quickly. Process your PDFs securely with its intuitive interface.
- 1. Open your PDF in WPS Office: Launch WPS Office and open the legal document you need to format.
- 2. Access Header and Footer tools: Go to the 'Insert' or 'Page' tab and click on the 'Header and Footer' option to customize your page labels.
- 3. Customize your prefix and page numbers: Add your required prefix (such as the specific file name) into the header or footer text box, insert the page number macro, and set the starting page number to apply it across your document.

Frequently Asked Questions
Why doesn't standard Bates numbering restart for each file automatically?
Standard Bates numbering tools are built to provide continuous sequential numbering across an entire batch of documents to explicitly prevent duplicate numbers across different exhibits. Restarting per file goes against standard batching logic, which is why it often requires manual setup per file.
Can I use the file name as a Bates prefix automatically?
Native PDF features usually require you to type the prefix manually in the dialog box. Automatically extracting the file name to use as a prefix requires custom JavaScript actions or specialized legal PDF processing add-ons.
What format do courts typically require for Bates stamping?
While exact requirements vary by jurisdiction, a standard format includes an alphanumeric prefix (often identifying the submitting party or exhibit number) followed by a hyphen and a sequential number with leading zeros, such as 'PLTF-000001'.




