Automate PDF First Page to JPEG Conversion Using Adobe Acrobat
Question details
The user wants to automate extracting and converting only the first page of multiple PDF files into JPEG images without modifying the original documents.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Batch converting the first page of PDFs to image files within a specific folder.
- Observed behavior
- Needs to execute an Acrobat Action using JavaScript to process a folder of PDFs, saving out JPEGs while keeping the original PDFs intact.
Ensure you have Adobe Acrobat Pro installed, as Acrobat Reader does not support creating custom Action Wizards or running advanced JavaScript document manipulation commands.
Use an Acrobat Action with JavaScript to Convert First Page to JPEG
Create a custom Acrobat Action that runs a JavaScript snippet on a batch of files to extract the first page, save it as a JPEG, and close the file without saving PDF modifications.
This automated approach uses Acrobat's Action Wizard to batch process an entire folder. The JavaScript temporarily removes all pages except the first one, saves the remainder as an image, and discards the changes to the PDF so the source document is unaffected.
Launch Adobe Acrobat Pro. Go to 'Tools' and select 'Action Wizard'. Click 'New Action' in the top toolbar to begin creating your automation.
Under 'Files to be Processed' on the right panel, click 'Add Folder' and select the directory containing the PDF files you want to convert.
From the left pane under 'More Tools', select 'Execute JavaScript' and click the '+' button to add it to your action steps. Uncheck the 'Prompt user' checkbox to ensure the batch runs silently.
Click 'Specify Settings' on the Execute JavaScript step. Paste the following code: `if (this.numPages > 1) this.deletePages(1, this.numPages - 1); this.saveAs({cPath: this.path.replace(/\.pdf$/i, "_p1.jpg"), cConvID: "com.adobe.acrobat.jpeg"}); this.dirty = false;`. Click 'OK'.
Save the action with a recognizable name like 'Extract First Page to JPEG'. Click on it from the Action Wizard list and hit 'Start' to process your folder.

Easily Convert PDF Pages to JPEGs with WPS Office
If you prefer avoiding complex JavaScript code, WPS PDF provides a built-in, highly intuitive 'PDF to Picture' feature. You can visually select specific pages, such as page 1, and export them directly to high-quality image formats with just a few clicks.
- 1. Open PDF in WPS Office: Launch WPS Office and open your target PDF file.
- 2. Access PDF to Picture: Navigate to the 'Tools' tab on the top ribbon and click the 'PDF to Picture' button.
- 3. Select the First Page: In the export dialog box, change the 'Page Range' option to Custom and type '1' to export only the cover page.
- 4. Set Format and Export: Choose 'JPG' as the Output Format, adjust your desired image quality, and click 'Export' to save the image.

Frequently Asked Questions
Why did my Acrobat action save the PDF with missing pages?
If you omit the `this.dirty = false;` line in your JavaScript, Acrobat recognizes that pages were deleted and may either prompt you to save the document or auto-save it, potentially overwriting your original file.
Can I change the script to save the image as a PNG instead of JPEG?
Yes, you can alter the `cConvID` value in the JavaScript. Use `com.adobe.acrobat.png` instead of `com.adobe.acrobat.jpeg`, and update the `.jpg` extension replacement logic to `.png`.
Does this JavaScript method work on Adobe Acrobat Reader?
No, Adobe Acrobat Reader cannot run custom Action Wizards or execute document-altering JavaScript commands like `deletePages()` or `saveAs()`. A licensed version of Acrobat Pro is required.




