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

How to Hide JavaScript code in a form

Explorer ,
Apr 30, 2020 Apr 30, 2020

Copy link to clipboard

Copied

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

Views

190

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

You can obfuscate the code.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

"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 😉

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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