PDF Editing Issues

How to Auto-Increment Sequential Bates Numbers in PDF Forms

Nimra MalikNimra Malik Nov 3, 2026 869 views

Question details

The user needs to automatically generate sequential Bates numbers (e.g., 000001, 000002) across multiple instances of a one-page fillable PDF form.

How to Create Sequential Instances of a Bates-Numbered PDF Form
Product
PDF
Device & OS
not provided
Scenario
Generating multiple instances of a fillable form that require unique, sequentially increasing identification numbers.
Observed behavior
The standard Bates numbering tool applies static text, meaning the number remains the same (e.g., 000001) and fails to automatically increment on subsequent form instances.
Before you start

Ensure your PDF editor supports interactive form fields and JavaScript calculations, as standard static Bates numbering tools cannot dynamically increment on their own.

Solution 1Recommended

Use a Form Field with JavaScript to Auto-Increment Numbers

Since standard Bates numbers are static text, you must use an interactive text field coupled with a custom JavaScript calculation to generate sequential numbers for each new form instance.

Standard Bates numbering tools provided by most PDF editors stamp static text onto existing pages. When you create a new instance or copy of a one-page fillable form, the stamped text remains identical.

To achieve dynamic, sequential numbering, you need to replace the static Bates number with an interactive form field. By applying a document-level or custom calculation script, you can force the field's value to automatically increment when the document is printed, saved, or when a new instance is spawned.

1
Add a Text Field

Open your PDF in your editor, navigate to the Form or Prepare Form tools, and add a new Text Field in the location where the Bates number should normally appear.

2
Set Field Properties to Read-Only

Right-click the newly created text field, open its Properties, and check the 'Read-Only' box under the General tab so users cannot manually alter the generated sequential number.

3
Add Custom JavaScript Calculation

In the field properties, navigate to the Calculate tab, select 'Custom calculation script', and input a JavaScript code snippet designed to increment the field's value (e.g., using a global counter or increasing the value upon a print action).

4
Save and Test the Form

Save the PDF document as your master template. Trigger the defined action (such as printing the form) to test the script and ensure the number dynamically changes to the next sequence.

Use a Form Field with JavaScript to Auto-Increment Numbers
JavaScript Requirement: Writing PDF JavaScript requires basic programming logic. The exact script depends heavily on your specific workflow—whether you want the number to increment upon printing, saving, or by clicking a dedicated 'Add New Instance' button.
Powerful PDF Editor

Easily Manage PDF Forms and Advanced Scripting with WPS Office

WPS Office provides a comprehensive suite of PDF tools, allowing you to insert traditional Bates numbers, create interactive fillable form fields, and manage custom form properties effortlessly.

  1. 1. Open Your Document: Launch WPS Office and open your target PDF document.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access interactive form controls.
  3. 3. Insert a Text Field: Click on 'Text Field' and place it in the header or footer area where you want the sequential number to appear.
  4. 4. Configure Properties: Double-click the inserted field to access its properties, where you can configure read-only status and calculation settings.
Full support for interactive PDF form fieldsSeamless compatibility with standard PDF document structuresLightweight, fast, and user-friendly interfaceFree basic PDF editing and form management features
QA img-9

Frequently Asked Questions

What is a Bates number in a PDF?

Bates numbering is an indexing method used primarily in legal, medical, and business fields to place unique, sequential identification numbers, date, or time marks on every page of a document for easy retrieval.

Why doesn't standard Bates numbering increment when I copy a form?

Standard Bates numbering applies static text permanently to the current pages of a document. It is not dynamically linked to form duplication, meaning copies of the page will retain the exact same stamped text.

Can I use a macro instead of JavaScript for PDF forms?

No, PDF documents rely specifically on JavaScript for interactive and dynamic form calculations. Macros (VBA) are typically used in applications like Word or Excel, not inside standard PDF files.

How do I remove standard Bates numbering from a PDF?

In your PDF editor, navigate to the Edit, Pages, or Insert tab, select the Bates Numbering dropdown, and click 'Remove' to delete the statically applied numbers from the entire document.