PDF Conversion Issues

How to Create Automatic PDF Filenames Using Acrobat Action Wizard

Olivia MillerOlivia Miller Oct 28, 2026 869 views

Question details

The user needs to configure Acrobat Action Wizard to automatically generate filenames based on the current date and time when saving scanned and OCR'd PDFs.

How to Create Automatic PDF Filenames Using Acrobat Action Wizard
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Automating the scanning, OCR, and saving process for multiple PDF documents to ensure unique, timestamped filenames.
Observed behavior
The user wants the system to automatically save files with a timestamp (e.g., 2018-05-06-164515) to a local folder to prevent filename collisions.
Before you start

Ensure you have Adobe Acrobat Pro installed, as the Action Wizard and custom JavaScript execution features are not available in the standard Acrobat Reader.

Solution 1Recommended

Use JavaScript in Action Wizard to Generate Timestamped Filenames

Add a custom JavaScript execution step to your Action Wizard workflow to dynamically generate a filename using the current date and time.

By utilizing Acrobat's built-in util.printd function, you can format the current date and time into a precise string. Including seconds in your timestamp structure (e.g., YYYY-MM-DD-HHMMSS) significantly reduces the risk of overwriting files when processing documents in bulk.

1
Open Action Wizard

Open Adobe Acrobat Pro and navigate to Tools > Action Wizard.

2
Create or Edit an Action

Click New Action to start fresh, or select an existing action that already includes your Scan and Recognize Text (OCR) steps.

3
Insert JavaScript Step

From the left panel under More Tools, select Execute JavaScript and add it to your action steps immediately after the OCR process.

4
Configure the Timestamp Script

Click Specify Settings on the newly added JavaScript step and enter a script using util.printd("yyyy-mm-dd-HHMMss", new Date()) to format the current date and time.

5
Define the Save Destination

Use the this.saveAs() method within the same script block to define the destination folder path and append your newly generated timestamp string as the file's name.

Use JavaScript in Action Wizard to Generate Timestamped Filenames
Folder Permissions: Ensure that Acrobat has the necessary system read and write permissions for the destination folder specified in your JavaScript code, or the save step will fail silently.
Efficient PDF Management with WPS Office

Scan, OCR, and Manage PDFs Easily with WPS Office

While Acrobat requires custom JavaScript for workflow automation, WPS Office offers an intuitive, accessible interface for scanning documents, performing OCR, and easily managing your PDF files without any coding required.

  1. 1. Open WPS PDF: Launch WPS Office and open your scanned document using the WPS PDF editor.
  2. 2. Perform OCR: Navigate to the Tools tab and click on the OCR button to convert your scanned document into editable or searchable text.
  3. 3. Save and Rename Document: Click Menu > Save As, choose your designated local folder, and enter your preferred date or time string as the filename to securely save your processed file.
Built-in OCR technology to extract text from scanned PDFs effortlessly.High compatibility with Adobe PDF formats and Microsoft Office files.User-friendly interface for quick document saving and management.Lightweight software that processes large PDF documents smoothly.
QA img-9

Frequently Asked Questions

Can I use Acrobat Reader to run Action Wizard scripts?

No, the Action Wizard and advanced JavaScript execution capabilities are exclusive to Adobe Acrobat Pro. Acrobat Reader only allows basic document viewing and form filling.

What happens if two files are processed at the exact same second?

If your timestamp format only goes down to the second, processing two files simultaneously might cause a filename collision. You can mitigate this by adding a random number generator or a millisecond variable to your JavaScript output.

What is the util.printd function in Adobe Acrobat?

util.printd is a specific JavaScript method within the Acrobat API used to format standard JavaScript Date objects into readable strings, allowing you to quickly convert a standard date into formats like 'YYYY-MM-DD'.

Does WPS Office support automated JavaScript for PDF files?

WPS Office focuses on an accessible, user-friendly graphical interface for tasks like OCR and PDF editing. It does not natively support Adobe's proprietary Action Wizard JavaScript API for automated batch renaming.