Skip to main content
Inspiring
March 23, 2025
Question

Protected interactive Acrobat form and script execution issues

  • March 23, 2025
  • 1 reply
  • 352 views

Hello everyone, and thank you in advance to anyone who might be able to help.

I’ve created a complex interactive PDF form. Now I’d like to distribute it, but with protection in place to prevent users from accessing the structure of the form or copying the scripts.

I applied password protection to restrict editing, allowing users to fill out the form but not modify the pages. However, this causes a problem: script execution is blocked with a warning that the current permissions do not allow operations on templates.

In my form, various templates are used to generate pages, which are shown or hidden depending on user input. This functionality is blocked unless page modification is allowed — but if I enable that, the form’s structure and scripts become fully visible.

So, I tried a different approach: all templates are hidden, and I use spawn() to generate pages. But when I attempt to delete a page (instead of just hiding it), I still get a permissions error due to the protection settings.

Has anyone encountered a similar issue and found a workaround?

Thanks to everyone for your time and help!

1 reply

PDF Automation Station
Community Expert
Community Expert
March 23, 2025

The following settings do not allow viewing scripts or changing the document, but allow spawning templates and deleting the spawned pages:

 

Inspiring
March 23, 2025

Thanks for Your fast answer but unfortunately I applied that kind of protection and pages are created but page 0 (the only one that originally existed in file) can't be deleted. There are not error disclaimer but in console You can read:

RaiseError: Operazione non consentita.
Doc.deletePages:29:Field Genera Parcella:Mouse Up
===> Operazione non consentita.RaiseError: Operazione non consentita.
Doc.deletePages:29:Field Genera Parcella:Mouse Up
===> Operazione non consentita.

Inspiring
March 23, 2025

Let me clarify: it’s possible to delete one of the pages generated by the form, but there’s no way to delete the original existing page