How to Enable and Spawn PDF JavaScript Templates in Adobe Reader
Question details
The user wants to know how to enable dynamic page spawning and deleting using JavaScript templates in Adobe Reader.

- Product
- Adobe Reader
- Device & OS
- not provided
- Scenario
- Attempting to execute JavaScript templates to spawn or delete pages in a PDF document using the free Adobe Reader client.
- Observed behavior
- The JavaScript template scripts work perfectly in Adobe Acrobat but fail to execute or spawn pages in the free Adobe Reader.
Ensure you have access to Adobe Acrobat Standard or Pro, as the free Adobe Reader cannot apply the necessary extended permissions to the document itself.
Enable Reader Extensions in Adobe Acrobat
To allow the free Adobe Reader to execute template-spawning scripts, the PDF must be saved with Reader Extensions enabled using Acrobat Standard or Pro.
Adobe Reader restricts certain advanced JavaScript executions, such as spawning or deleting pages, for security and licensing reasons. By applying Reader Extensions via Acrobat, you grant the free Reader client the elevated permissions required to run these specific scripts.
Launch Adobe Acrobat Standard or Pro and open the PDF document containing your JavaScript templates.
Ensure your script uses the correct Reader-extended JavaScript APIs, specifically 'this.getTemplate("TemplateName").spawn(...)' for spawning and 'this.deletePages(...)' for deleting pages.
Navigate to the top menu and go to 'File' > 'Save As Other' > 'Reader Extended PDF' > 'Enable More Tools (includes form fill-in & save)'.
Save the newly extended PDF. When users open this file in the free Adobe Reader, they will now have the necessary permissions to execute the template-spawning scripts.

Edit and Manage PDFs Easily with WPS Office
If you are looking for a lightweight, comprehensive, and free alternative to manage your PDF documents, WPS Office provides powerful PDF editing, reading, and conversion tools without complex permission hurdles.
- 1. Download WPS Office: Download and install WPS Office from the official website.
- 2. Access PDF Tools: Open WPS Office and click on the 'PDF' tab to access the dedicated PDF toolset.
- 3. Manage Your Documents: Open your PDF document to start reading, editing, or converting with ease.

Frequently Asked Questions
Why does my JavaScript work in Acrobat but not in Adobe Reader?
Adobe Reader has restricted permissions for security reasons. Advanced JavaScript functions, like spawning or deleting pages from templates, require the document to have 'Reader Extensions' enabled by Acrobat Pro or Standard.
What is the correct JavaScript syntax to spawn a page from a template?
You should use the API 'this.getTemplate("YourTemplateName").spawn();'. Ensure the template name exactly matches the one defined in your document.
Can I enable Reader Extensions using the free Adobe Reader?
No, enabling Reader Extensions requires a paid version of Adobe Acrobat (Standard or Pro). Adobe Reader can only consume the extended rights, not apply them.




