How to Batch Extract the First Page from Multiple PDFs Using Acrobat Action Wizard
Question details
The user needs a way to automatically extract the first page from multiple PDF documents in a folder and save them as individual files.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Batch processing multiple PDF files located in a specific folder to isolate and save only their first pages without doing it manually for each file.
- Observed behavior
- Requires a custom JavaScript solution within Acrobat's Action Wizard to handle the extraction, as the built-in wizard needs a script to automate the extraction and designate a pre-existing output folder.
Before running the batch process, you must manually create the destination folder on your computer (e.g., C:\First Pages\). The Acrobat Action Wizard script cannot create new directories, and the process will fail if the folder does not exist.
Use JavaScript in Acrobat Action Wizard
Create a custom Action Wizard routine utilizing JavaScript to batch extract the first page and save it to your designated folder.
Adobe Acrobat's Action Wizard allows you to automate repetitive tasks across multiple PDFs. By adding a specific JavaScript execution step, you can command Acrobat to extract page one from each file and save it with a customized naming convention.
Navigate to your C: drive using File Explorer and create a new folder named 'First Pages'. Ensure this exact path (C:\First Pages\) exists before proceeding.
Launch Adobe Acrobat. Go to the 'Tools' tab, scroll down to the 'Customize' section, and select 'Action Wizard'. Click on 'New Action' in the top toolbar.
In the 'Files to be Processed' section on the right, click 'Add Folder' and select the directory containing the multiple PDF files you want to extract pages from.
In the left pane under 'Choose tools to add', expand 'More Tools' and select 'Execute JavaScript'. Click the '+' button to add it to your Action steps. Uncheck the 'Prompt user' box so the script runs without interruption.
Click 'Specify Settings' under the Execute JavaScript step and paste the following code: this.extractPages(0, 0, "/C/First Pages/P1 from "+this.documentFileName); Click OK, then save your Action with a recognizable name like 'Extract First Page'.
Select your newly created Action from the Action Wizard list. Click 'Start' to begin the process. Acrobat will open each file, extract the first page, and save it to your C:\First Pages\ folder.

Extract PDF Pages Easily with WPS Office
If writing JavaScript and configuring Action Wizards seems too complicated, you can easily extract, split, or merge PDF pages using WPS Office's built-in PDF tools. WPS provides an intuitive visual interface to handle PDF extraction without writing a single line of code.
- 1. Open Your PDF: Launch WPS Office and open the PDF file you wish to extract pages from.
- 2. Navigate to the Page Tab: Click on the 'Page' tab located in the top menu ribbon to access page management tools.
- 3. Select Extract Page: Click the 'Extract Page' button to open the extraction settings dialog box.
- 4. Set Page Range: Choose 'Custom page ranges' and type '1' to isolate the first page, or select the specific thumbnails you need.
- 5. Extract and Save: Click the 'Extract' button and choose your desired output folder to save the newly created PDF.

Frequently Asked Questions
Can I modify the Acrobat script to extract the first 5 pages instead of just the first page?
Yes. The extractPages method uses a 0-based numbering system. To extract pages 1 through 5, change the script to: this.extractPages(0, 4, "/C/First Pages/P1-5 from "+this.documentFileName);
Why did my Acrobat Action Wizard script fail to save the extracted files?
This almost always happens because the destination folder specified in the script does not exist on your computer. The JavaScript extractPages function cannot create new directories. You must manually create the folder (e.g., C:\First Pages\) before clicking Start.
How can I change the save location in the JavaScript code?
You can change the file path in the quotation marks. For example, to save to a folder named 'Output' on your D drive, modify the path to: "/D/Output/" + this.documentFileName. Ensure you use forward slashes (/) in the script path.




