Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Protected interactive Acrobat form and script execution issues

Explorer ,
Mar 23, 2025 Mar 23, 2025

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!

TOPICS
JavaScript , PDF forms
136
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2025 Mar 23, 2025

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

PDFAutomationStation_0-1742756434925.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 23, 2025 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 23, 2025 Mar 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2025 Mar 23, 2025

Because the security policy prevents editing the file in other ways than specified. Also, that won't work at all if the file is used in Reader (even without the security policy). There you can only remove pages which were spawned from a Template.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2025 Mar 23, 2025
LATEST

Deleting a page that was not spawned from a template is changing the document, which the security settings prevent.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines