PDF Editing Issues

How to Scale Only Page 1 of a PDF to A4 Using Acrobat JavaScript

Natalie TaylorNatalie Taylor Nov 5, 2026 869 views

Question details

The user needs a method to run a Preflight fixup or JavaScript that scales only the first page of a PDF document to A4 size without affecting the remaining pages.

How to Scale Only Page 1 of a PDF to A4 Using Acrobat JavaScript
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Automating page resizing for specific pages within a larger PDF document.
Observed behavior
Acrobat JavaScript can execute a Preflight profile, but the profile processes the entire document because JavaScript cannot dynamically pass a specific page-range parameter to it.
Before you start

Verify your current Preflight profile settings to see if it allows internal conditional targeting for the first page before resorting to extraction scripting.

Solution 1Recommended

Extract, Scale, and Replace the Target Page

Since Acrobat JavaScript cannot dynamically pass page-range parameters to a Preflight profile, you must isolate the page, apply the fixup, and reinsert it.

JavaScript can execute a Preflight profile exactly as it is defined, with limited parameter overrides (like showing a progress bar). To apply an A4 scaling profile to just one page, you must separate the page from the main document first.

1
Extract the first page

Use an Acrobat script or the built-in Page Extraction tool to extract page 1 and save it as a new, standalone PDF document.

2
Run the Preflight profile

Execute your A4 scaling Preflight fixup on the newly created single-page PDF to scale it appropriately.

3
Replace the original page

Import the scaled page back into the original PDF by using the 'Replace Pages' command to swap out the unscaled first page.

4
Delete temporary files

Remove the temporary extracted standalone PDF from your storage to complete the process.

Extract, Scale, and Replace the Target Page
JavaScript Limitations: You cannot pass variable parameters (such as a specific page number to process) directly into the Preflight profile via JavaScript; the profile will always run based on its internal rules.
Easy PDF Page Formatting

Resize Specific PDF Pages Easily with WPS PDF

If setting up JavaScript workarounds in Acrobat feels overly complex, WPS PDF provides an intuitive, graphical way to extract, resize, and replace specific PDF pages without writing a single line of code.

  1. 1. Open the document in WPS PDF: Launch WPS Office and open your target PDF file.
  2. 2. Extract the target page: Navigate to the 'Page' tab, click 'Extract Page', select the first page, and extract it as a separate document.
  3. 3. Resize via Print to PDF: Open the extracted page, click 'Print', choose 'WPS PDF' as the printer, set your paper size to 'A4', check 'Fit for printing margin', and click Print to save the newly scaled file.
  4. 4. Replace the page: Return to your original multi-page PDF document, navigate back to the 'Page' tab, click 'Replace Page', and swap the first page with your newly saved A4 PDF.
Easily extract, replace, and resize individual PDF pages via the visual interfaceFull format compatibility with standard Adobe PDF filesLightweight and completely free alternative for standard PDF editing tasks
microsoft office alternative - wps office

Frequently Asked Questions

Can I pass a page range parameter to an Acrobat Preflight profile using JavaScript?

No. Acrobat JavaScript can only trigger a Preflight profile to run as defined. It cannot dynamically pass custom arguments, such as specific page numbers or page ranges, to alter the profile's behavior at runtime.

Why does my Preflight profile scale the entire document?

By default, Preflight fixups apply globally to the entire document. Unless the profile itself has built-in conditional rules designed to target specific elements or pages, it will process every page.

Is there a non-scripting way to scale one PDF page to A4?

Yes. You can manually extract the page you want to resize, use a 'Print to PDF' feature with the paper size set to A4 and scale-to-fit enabled, and then replace the original page with the newly generated A4 page.