◆ Acrobat · combine

Automate Bates numbering using Acrobat JavaScript or API

I have a stack of legal [exhibit]s for the [case] that must be archived in order. Apply sequential Bates numbers acros…

3ready prompts
2real tasks
3roles

When to use it

real situations

AI prompts

3 ways to ask · copy any one
AExecute — “help me do it”Show me how to add Bates numbers to PDFs using the Acrobat API...…+
Show me how to add Bates numbers to [my PDF files] using the Acrobat API or JavaScript, including sample code.
when the reply comes backWant to add custom prefixes or date stamps to your Bates numbers?
BImprove — “do it better”How can I make my Bates numbering script run faster or handle more files...…+
How can I make my Bates numbering script run faster or handle more files at once using the Acrobat API?
when the reply comes backNeed help with authentication for the Acrobat API?
CDecide — “help me choose”Should I use Acrobat JavaScript or the PDF Services API for Bates numbering...…+
Should I use Acrobat JavaScript or the PDF Services API to automate Bates numbering for a large batch of documents? Please compare.
when the reply comes backAsk about handling password-protected PDFs in your automation.

How to do it

the tool · the steps · what to avoid
  1. 1

    Open the PDF file you want to apply Bates numbering to in Adobe Acrobat Pro.

  2. 2

    Press Ctrl+J (Windows) or Cmd+J (Mac) to open the JavaScript console.

  3. 3

    Paste a custom JavaScript script that iterates through each page and adds a Bates number using the addWatermarkFromText or addAnnot method.

    Best practiceYou can customize the Bates number format and position by adjusting the script parameters for font, size, and location.

  4. 4

    Edit the script to set your desired starting number, prefix, and formatting for the Bates numbers.

    NoteAdobe's JavaScript API Reference documents methods like addWatermarkFromText for text stamping.

  5. 5

    Run the script in the console to apply Bates numbers to all pages programmatically.

  6. 6

    Save the PDF with a new filename to preserve the original document.

    CautionAlways save a backup before running scripts that modify documents in bulk.

You can use Acrobat's JavaScript console to automate repetitive tasks like Bates numbering across large documents.

This runs in the Acrobat app - there is no separate API for this task.

Glossary

words on this page
Bates numberingA way to add unique numbers to each page in a set of documents.ExampleUsing Bates numbering, each page in a collection of court exhibits gets a sequential number.
APIA way for different software to talk to each other automatically.ExampleAn online store uses an API to automatically send shipping details to a delivery service.
AutomationMaking things happen by themselves, without manual work each time.ExampleUsing Automation, you can set up a rule to automatically sort incoming emails into specific folders.

The real tasks

all 2, listed here
Add bates numbering to a package of title documents so each page is uniquely referenced in reports.
Add bates numbering to a closing packet so legal and compliance can reference pages during audits.

Who does this

3 roles
Litigation Support SpecialistLegal TechnologisteDiscovery Analyst

FAQ

about this task

You can use the Adobe PDF Services API or Acrobat Services API to add Bates numbers by sending your PDF file and specifying the numbering options in your API request. The API will process the file and return a new PDF with Bates numbers on each page.

Using JavaScript works inside Acrobat and is good for simple or one-off tasks, but the API is better for automating large batches, working from your own software, or handling files in the cloud. The API also supports more advanced workflows.

Yes, the API lets you set options like prefix, starting number, number of digits, and even add extra text or date stamps to your Bates numbers. You can adjust these settings in your API call.

Automating Bates numbering saves time, reduces mistakes, and makes it easy to track lots of documents. It's important for legal cases where every page needs a unique number for reference.

You need to create an Adobe developer account, set up a project, and use the credentials (like API key or OAuth token) in your code to prove your identity when calling the API.

Sources

where this comes from
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.
Built on public evidence: O*NET®, ESCO, Wikipedia, U.S. Bureau of Labor Statistics, forum demand signals.