PDF Editing Issues

Fix an Acrobat Button That Won’t Spawn a Blank PDF Form Page

Huda QurayshiHuda Qurayshi Nov 19, 2026 868 views

Question details

The user needs an Acrobat form button to spawn a blank page from a PDF template.

Fix an Acrobat Button That Won’t Spawn a Blank PDF Form Page
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A button runs JavaScript to add a blank template page to a PDF form.
Observed behavior
The template does not hide or appear correctly when the button is clicked.
Before you start

Open the PDF in Adobe Acrobat with access to Prepare a Form and Page Templates. Confirm that JavaScript is enabled in Acrobat preferences and that the template page has blank form fields.

Solution 1Recommended

Check the template and test a simple spawn action

Use this approach to isolate template naming, visibility, and button-script problems before adding more complex logic.

1
Verify the template name

Open All tools > Organize pages > More > Page templates, or the equivalent Page Templates command in your Acrobat version. Check the exact template name, including capitalization and underscores.

2
Hide the template

In Page Templates, select the template and use its visibility control to hide it. Leave the blank template available for spawning rather than deleting it.

3
Check the button action

Open All tools > Prepare a form, select the button, and open Properties > Actions. Set the trigger to Mouse Up and select Run a JavaScript.

4
Test a basic script

In the button’s JavaScript editor, use the exact template name in a simple test: var t = this.getTemplate("Template1"); if (t) { t.spawn({nPage: this.numPages, bRename: true, bOverlay: false}); } else { app.alert("Template not found"); } Replace Template1 with your actual template name.

5
Test and inspect errors

Close the form editor and click the button. If nothing happens, open Acrobat’s JavaScript console and check for errors; once the basic spawn works, add deletion or conditional logic back one piece at a time.

Check the template and test a simple spawn action
Check Acrobat version and viewer support: Menu names and JavaScript behavior can vary by Acrobat version. Test in Acrobat rather than assuming a browser PDF viewer supports Acrobat template-spawning scripts.
Free Microsoft Office alternative

Edit PDF Documents and Office Files with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office files. Its format compatibility helps you move existing documents into your workflow, but it does not fix Acrobat-specific template-spawning JavaScript.

Open and edit PDFs with WPS PDF toolsCompatible with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface to move between documents, spreadsheets, and presentationsWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does Acrobat say the template cannot be found?

Open Page Templates and compare its name with the argument in getTemplate(). The name must match exactly, including capitalization and underscores.

Where should I add the spawn script to the button?

In Prepare a form, open the button’s Properties > Actions, choose Mouse Up as the trigger, and add a Run a JavaScript action.

How can I find a JavaScript error after clicking the button?

Open Acrobat’s JavaScript console after testing the button and review any reported errors. Start with a simple spawn script before restoring other logic.

Will the button work in a browser PDF viewer?

Not necessarily. Browser viewers may not support Acrobat’s template-spawning JavaScript, so test the form in Adobe Acrobat.