Other PDF Issues

How to Batch Rename PDF Invoices Using OCR Data in Acrobat

Anum MushtaqAnum Mushtaq Nov 3, 2026 869 views

Question details

The user wants to automatically extract data like invoice numbers and dates from PDF invoices using OCR, and use that extracted data to batch rename the files in Acrobat Pro.

How to Batch Rename PDF Invoices Using OCR Data in Acrobat
Product
Adobe Acrobat Pro
Device & OS
not provided
Scenario
Processing a batch of newly added PDF invoices to extract key fields via OCR and rename the files according to a standardized naming convention.
Observed behavior
Acrobat Pro's built-in Scan and OCR tool can batch-process files but cannot natively use extracted OCR text to overwrite and rename the original files directly.
Before you start

Ensure all your PDF invoices are gathered in a single local folder and that they have clear, legible text for the best OCR accuracy before running any batch scripts.

Solution 1Recommended

Use Acrobat Action Wizard and JavaScript to Extract Text and Save Copies

Utilize Acrobat's Action Wizard combined with custom JavaScript to run OCR, extract specific words, and save the documents as new files.

Acrobat cannot natively rename the original file currently open in the application. However, you can write a JavaScript macro to extract text using methods like doc.getPageNthWord() and save a new copy of the file with the desired name.

1
Open Action Wizard

Open Adobe Acrobat Pro, navigate to the 'Tools' menu, and select 'Action Wizard'.

2
Create a New Action

Click 'New Action' in the toolbar to create a custom batch process for your invoice folder.

3
Add OCR Recognition

Under 'Choose tools to add', select 'Recognize Text' and add it to your action steps to ensure the invoices are fully searchable.

4
Execute JavaScript

Add an 'Execute JavaScript' step from the 'More Tools' section. Insert your custom script to locate the invoice number and use the 'saveAs' method to export the document as a newly named file.

Use Acrobat Action Wizard and JavaScript to Extract Text and Save Copies
Requires Scripting Knowledge: This method requires familiarity with the Acrobat JavaScript API to correctly identify and extract the exact invoice numbers and dates from varying layouts.

Manage and Process PDF Invoices Easily with WPS Office

While setting up complex JavaScript in Acrobat can be challenging, WPS Office provides intuitive, built-in PDF tools. With powerful OCR capabilities, you can quickly convert scanned invoices into editable text or Excel spreadsheets, making data extraction and file management significantly more straightforward.

  1. 1. Open PDF in WPS: Launch WPS Office and open your scanned invoice document in the WPS PDF reader.
  2. 2. Access OCR Tools: Navigate to the 'Tools' tab on the top ribbon and click on the 'OCR' button to recognize the text in your document.
  3. 3. Extract or Convert: Choose to extract the plain text directly from the screen, or select 'PDF to Excel' to convert the invoice data into a structured spreadsheet for easy tracking.
Highly accurate WPS PDF OCR technology to extract invoice text and dataEasily convert PDF invoices directly to Excel for bulk data managementFully compatible with standard PDF formats and Microsoft Office documentsLightweight application with a highly intuitive user interface
microsoft office alternative - wps office

Frequently Asked Questions

Can Adobe Acrobat batch rename files natively without scripts?

No, Adobe Acrobat does not have a native, built-in feature to batch rename files using text extracted from the document. It requires custom JavaScript to save copies under new names or third-party renaming utilities.

Why does Acrobat save a copy instead of renaming the original file?

Acrobat's security and scripting architecture prevents it from modifying the filename of the active document that is currently open. Scripts can only use the 'saveAs' function to create a distinctly named copy in a specified directory.

What is the best way to extract specific data like invoice numbers from a PDF?

For complex layouts, using OCR to make the text readable, followed by pattern matching (such as Regular Expressions) in a script or utilizing dedicated invoice processing software, is the most reliable method to accurately locate and extract varying invoice numbers.