Other PDF Issues

How to Read Metadata from Multiple PDFs with Acrobat JavaScript

Nimra MalikNimra Malik Nov 2, 2026 869 views

Question details

The user needs to extract metadata from multiple PDF files automatically using scripting in Adobe Acrobat Pro DC.

How to Read Metadata from Multiple PDFs using Acrobat JavaScript
Product
Adobe Acrobat Pro DC
Device & OS
not provided
Scenario
Running a batch process across multiple PDF files to programmatically extract and read document properties like Author, Title, and Subject.
Observed behavior
Requires a method to design and execute a JavaScript batch process to automate metadata reading for a specific file workflow.
Before you start

Ensure you have Adobe Acrobat Pro DC installed, as the Action Wizard and advanced batch JavaScript processing features are not available in the standard Acrobat Reader.

Solution 1Recommended

Use Action Wizard to Run a Custom JavaScript Batch Process

Create an automated batch process using the Acrobat Action Wizard to execute a custom JavaScript on an entire folder of PDFs, allowing you to extract standard or custom document properties.

Adobe Acrobat Pro DC includes an Action Wizard feature designed for applying automated scripts across multiple files. By injecting a custom JavaScript into an Action, you can loop through a designated folder and read metadata such as Title, Author, Subject, and Keywords using the 'this.info' object.

1
Open the Action Wizard

Launch Adobe Acrobat Pro DC. Go to the 'Tools' tab and select 'Action Wizard' from the Customize section.

2
Create a New Action

Click on 'New Action' in the Action Wizard toolbar. Under 'Files to be Processed', click 'Add Folder' and select the directory containing your PDF files.

3
Add the JavaScript Execution Step

In the 'Choose tools to add' pane on the left, expand 'More Tools', select 'Execute JavaScript', and click the '+' button to add it to your action steps on the right.

4
Input the Metadata Script

Click 'Specify Settings' on the newly added Execute JavaScript step. Input your custom script to read metadata (e.g., accessing 'this.info.Title' and 'this.info.Author') and output it to the console or a file. Click 'OK'.

5
Save and Run the Action

Save the Action with a recognizable name like 'Extract PDF Metadata'. Click on the saved action in the Action List and press 'Start' to process all PDFs in the selected folder.

Use Action Wizard to Run a Custom JavaScript Batch Process
Handling JavaScript Output: By default, simple scripts output data to the Acrobat JavaScript Debugger Console (Ctrl+J). Exporting data directly to a CSV or external text file requires configuring Trusted Functions and folder-level scripts for security reasons.
Free Microsoft Office alternative

Need a simpler way to view and manage PDF metadata? Try WPS Office

While advanced automated scripting requires expensive Adobe Acrobat Pro subscriptions, WPS Office provides a lightweight, cost-effective, and highly intuitive alternative. It allows you to seamlessly view, edit, and manage PDF document properties alongside full compatibility with Word, Excel, and PowerPoint formats without requiring any complex coding.

  1. 1. Open your PDF in WPS Office: Launch WPS Office and open your PDF document using the robust built-in PDF editor.
  2. 2. Access Document Properties: Click on 'Menu' in the top-left corner, navigate to 'Document Properties', or use the relevant shortcuts.
  3. 3. View and Modify Metadata: In the Properties window, you can instantly view and edit metadata such as Title, Author, Subject, and Keywords without writing any scripts.
Easily view and edit PDF metadata through a straightforward, user-friendly interface.Fully compatible with standard PDF, Microsoft Word, Excel, and PowerPoint formats.Lightweight installation with a comprehensive suite of PDF viewing and editing tools.A free and intuitive alternative to expensive PDF software subscriptions.
QA img-9

Frequently Asked Questions

Can I extract custom metadata fields using Acrobat JavaScript?

Yes, Acrobat JavaScript can access standard metadata using the 'this.info' object, and it can also read custom properties defined in the document by referencing 'this.info.YourCustomFieldName'.

Do I need Adobe Acrobat Pro to run batch JavaScripts on PDFs?

Yes. The Action Wizard and the ability to execute folder-level batch JavaScript processes are exclusive features of Adobe Acrobat Pro DC and are not supported in the free Acrobat Reader.

Where does the extracted metadata go when running the script?

Unless specifically programmed otherwise using trusted functions, the extracted metadata is typically printed to the Acrobat JavaScript Console. Writing to an external file like an Excel or CSV document requires elevated security privileges and specialized scripting.