PDF Editing Issues

How to Add a Selected PDF as Pages to an Acrobat Form

Rana GarciaRana Garcia Nov 3, 2026 870 views

Question details

The user wants to create an interactive button in a PDF form that allows respondents to select another PDF file and insert it as pages directly into the document.

How to Add a Selected PDF as Pages to an Acrobat Form
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Designing an interactive PDF form where users need to append their own multi-page PDF documents into the current page flow rather than attaching them as embedded files.
Observed behavior
The native form button requires the insertPages JavaScript method, which is restricted for security reasons and fails in Adobe Reader without folder-level scripts.
Before you start

Verify that the end-users filling out the form have the full version of Adobe Acrobat installed, as standard Adobe Reader cannot execute the required page insertion scripts.

Solution 1Recommended

Configure the insertPages Method with Folder-Level JavaScript

Use a trusted folder-level JavaScript function to allow users with Adobe Acrobat to securely insert a PDF as pages.

Because inserting pages modifies the core structure of the PDF, Adobe imposes strict security restrictions on this action.

To bypass security warnings and allow a form button to execute the insertPages method, you must deploy a trusted folder-level JavaScript file on every user's computer.

1
Create a Trusted Function

Write a folder-level JavaScript file (.js) that defines a trusted function using app.trustedFunction. Inside this function, call the this.insertPages() method to bypass standard security restrictions.

2
Deploy the Script to Users

Save the .js file into the Acrobat application's Javascripts folder on each user's computer so the application recognizes it as a trusted local script.

3
Add a Button to the Form

Open your PDF form in Adobe Acrobat. Go to 'Prepare Form' mode and add a Button field to the desired page location.

4
Assign the JavaScript Action

Right-click the button, select 'Properties', navigate to the 'Actions' tab, choose 'Run a JavaScript', and input a script that calls your trusted folder-level function.

Configure the insertPages Method with Folder-Level JavaScript
Adobe Reader Limitations: This solution is designed for users operating Adobe Acrobat. It will not work for users using the free Adobe Acrobat Reader, as Reader lacks the necessary rights to modify page structures natively.
Easy PDF Page Management

Easily Insert and Merge PDF Pages with WPS Office

Instead of relying on complex folder-level JavaScripts and restricted form buttons, you can easily insert, merge, and organize PDF pages manually using the intuitive Page tools in WPS Office.

  1. 1. Open the PDF in WPS Office: Launch WPS Office and open your primary PDF document.
  2. 2. Navigate to the Page Tab: Click on the 'Page' tab in the top ribbon to access the visual page management tools.
  3. 3. Select Insert Pages: Click on 'Insert Pages' and choose 'From PDF' to browse and select the PDF file you want to append.
  4. 4. Configure Insertion Settings: Specify the exact location (e.g., after the current page or at the end of the document) and confirm to merge the pages instantly.
Visually insert blank pages or pages from other PDF files with a few clicksNo complex coding or folder-level scripts requiredFully compatible with standard PDF formats and Adobe Acrobat filesLightweight software that includes a comprehensive suite of PDF editing tools
QA img-9

Frequently Asked Questions

Can Adobe Reader users insert pages using a form button?

No, standard Adobe Acrobat Reader does not support the insertPages method for modifying document structure. End-users must have Adobe Acrobat Pro or Standard installed to perform this action.

Why do I need a folder-level script for the insertPages method?

Adding or extracting pages poses security risks if triggered automatically by malicious files. A folder-level JavaScript creates a trusted environment, proving the user has authorized elevated privileges on their local machine.

Is there a way to attach a PDF instead of inserting it as pages?

Yes. You can use the importDataObject method in JavaScript to allow users to attach a file to the PDF form. This method works in Adobe Reader and requires fewer security bypasses than modifying the page structure.