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

How to Hide JavaScript code in a form

Explorer ,
Apr 30, 2020 Apr 30, 2020

Hello, 

 

I need to be able to hide my JavaScript in a Form, How can this be done?

 

Regards,

JP

TOPICS
Acrobat SDK and JavaScript
1.1K
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 ,
Apr 30, 2020 Apr 30, 2020

Hi,

 

I would say that there is a lot more involved in what you're asking.

 

Normally you just protect the document with password and  apply editing and printing restrictions.

 

Protecting editing in such manner will prevent the users from accessing editing tools with Acrobat Pro DC for exapmle.

 

It will not prevent the document from having users save it to a postscript file format, printing to PDF, or flattening the protected file with web browsers or other types of PDF viewers.

 

If you're truly serious about PDF security, see below for more extensive about security:

 

https://www.pdfscripting.com/public/Trust-and-Privilege-in-Acrobat-Scripts.cfm 

 

That link above will open your eyes more to what you will be dealing with and give you an insight o  how to tighten up your PDFs.

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 ,
May 01, 2020 May 01, 2020

You can obfuscate the code.

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 ,
May 01, 2020 May 01, 2020

"Protecting editing in such manner will prevent the users from accessing editing tools with Acrobat Pro DC for exapmle."

lol

You are not serious, or you give bad advice 😉


Acrobate du PDF, InDesigner et Photoshoptographe
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 ,
May 01, 2020 May 01, 2020
LATEST

"You can obfuscate the code."

This is the best way for the PDF form to be rejected by all antivirus and anti malware, as well as by Gmail and most email servers.

 

I recommend instead to minify the JavaScript, it is not a real protection but it goes everywhere.

To "protect" my minified scripts I drown them in the mass, by adding dozens of unnecessary lines of code.


Acrobate du PDF, InDesigner et Photoshoptographe
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