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

PDF and Javscript in 2022 : Still good practice?

Community Beginner ,
Dec 05, 2021 Dec 05, 2021

For the last 2 years we are acreating interactive and long form for customers. For many reasons, these are not online and we provide them only in PDF with custom Javascript. We have added buttons such as "Attach file", custom Word counters for long fields and such.

 

However, in the last 18 months we had customers saying the buttons and all interactive forms don't work. After some investigation, it turns out the IT department has turned off Javascript by default on all supplied Laptop and Desktop computers. These clients are also not technical savy and explaining to turn off Javascript is not an option.

 

So my question is: Is using Javascript in PDF forms still good practice in 2022 and beyond? We are considering to only use inbuilt form functionality and ditch Javascript all together.

TOPICS
JavaScript , PDF forms , Standards and accessibility
1.2K
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 ,
Dec 06, 2021 Dec 06, 2021

Without JS the forms in PDF files are extremely limited. There's no real good reason to disable it, though. The security risks it poses are extremely minimal. I would ask your IT people to re-consider this approach.

 

A much bigger issue is that people now use browser plugins or other non-Adobe software to open PDF files (or even on mobile devices), where support for scripts is minimal at best, and usually non-existent.

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 ,
Dec 06, 2021 Dec 06, 2021

JavaScripts in HTML pages are most dangerous than in PDF files, so the choice of your IT does not seem very rational.


Acrobate du PDF, InDesigner et Photoshopographe
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 ,
Dec 06, 2021 Dec 06, 2021

It is possible that your customers may be opening this PDF in web browsers or other viewers, in which case, the PDF may not render appropriately, respect any security restrictions, and will not execute the intended JavaScript code embeded in your form(s).

 

If that is the case, you may need to encourage the users to open the PDFs in Adobe Acrobat Reader DC.

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 Beginner ,
Dec 06, 2021 Dec 06, 2021

I probably should have added, its the Government sector. The laptops have USB sticks disabled. Sites to file sharing such as dropbox or google drive are disabled. Most of our clients work in Government and had issues with Javascript being disabled in Acrobat by their IT department (various Universities).

 

Another issue we came across is while Javascript was enabled, "Enable menu items Javascript execution privilages" was switched off. So our "Attach file" button did not work - while the rest was was working.

 

Is Javascript enabled by a default Acrobat installation on a Machine?

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 ,
Dec 06, 2021 Dec 06, 2021
LATEST

> Is Javascript enabled by a default Acrobat installation on a Machine?

Yes.

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