How to Extract Form Data from Multiple PDFs to a CSV File
Question details
The user needs to collect form-field values from multiple PDF files stored in a folder and export all the collected data into a single CSV file.

- Product
- PDF Editors
- Device & OS
- not provided
- Scenario
- Batch processing multiple structured PDF forms to extract user-submitted data into a spreadsheet for easier analysis.
- Observed behavior
- A basic standalone PDF script cannot automatically discover and process every file in a folder, requiring an Action Wizard or a specific folder-level automation process to handle the batch extraction.
Gather all the target PDF files into a single, dedicated folder. Ensure that the form field names are strictly identical across all the PDFs to prevent data misalignment in your final CSV output.
Use Acrobat Action Wizard with JavaScript
Create an automated Acrobat Action to iterate through a target folder, read the form fields, and export the values into a CSV file.
Because a standalone script cannot determine the names of files inside a folder dynamically, you must utilize the Action Wizard tool in Adobe Acrobat Pro. This allows you to apply a custom JavaScript across an entire folder of documents in one continuous batch process.
Launch Adobe Acrobat Pro, navigate to the 'Tools' tab, and click on 'Action Wizard' to start creating a new batch process.
Click 'New Action' from the toolbar. Under 'Files to be Processed' on the left side, add the specific folder that contains all your PDF form files.
Under 'Choose tools to add', expand the 'More Tools' section, select 'Execute JavaScript', and click the plus (+) button to add it to your Action.
Click 'Specify Settings' on the newly added JavaScript step. Paste your custom script designed to read the specific form field names and format them into a comma-separated string.
Save the Action with a descriptive name. Click on it in the Actions List to run it. The script will process each file in the folder and output your consolidated CSV file to your designated location.

Convert PDF Forms to Spreadsheets Automatically with WPS Office
If you want to avoid writing complex JavaScript codes to extract data, WPS Office offers a comprehensive PDF toolkit. You can easily convert structured PDF documents into Excel spreadsheets (which can be saved as CSV) using the built-in PDF to Excel feature.
- 1. Open WPS PDF: Launch WPS Office on your computer and open the 'PDF' tab from the main interface.
- 2. Select PDF to Excel: In the top toolbar, click on 'PDF to Excel' to open the conversion dialog box.
- 3. Add Multiple PDFs: Click 'Add Files' to import all the PDF forms you wish to extract data from into the batch list.
- 4. Convert and Save as CSV: Choose your output directory and click 'Convert'. Once the Excel files are generated, you can easily open them in WPS Spreadsheet and use 'Save As' to export the data as a CSV file.

Frequently Asked Questions
Why is the data in my exported CSV file disorganized?
This usually happens if the form field names are not strictly consistent across all the PDF files you are processing. The extraction script relies on identical field names to align data into the correct CSV columns.
Can I extract PDF data to CSV without Adobe Acrobat?
Yes. You can use specialized PDF extraction software, or convert the PDFs directly to Excel/CSV using dedicated PDF converters like the WPS Office PDF-to-Excel tool.
Does a standalone JavaScript work for multiple files?
No. A standalone JavaScript executed within a single document cannot autonomously discover or process other files in a folder due to security restrictions. You must use a batch processing tool like an Action Wizard to loop through the folder.




