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

PDF forms hint when not working

New Here ,
Mar 03, 2021 Mar 03, 2021

Hi,

i've got a PDF with forms and some Javascript calculations in it.

All working fine when being opened in Acrobat, but behaving buggy when it comes to the Mac Preview App. The forms are shown, but the buttons and calculations do not react on any click. 

I understand that this is an Apple Software problem. But is there any way i could at least show a hidden field that says "Javascript is not working here, please open me in Acrobat reader"? Or any other workaround that the user get's aware of this?

 

thanks,

Christian

 

 

TOPICS
Create PDFs , General troubleshooting , How to , JavaScript , PDF forms
653
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
1 ACCEPTED SOLUTION
Community Expert ,
Mar 03, 2021 Mar 03, 2021

The way to approach this issue is to add a layer to the PDF that shows the warning that it must be opened in a more capable JavaScript-capable viewer to function properly. The layer should be shown by default. Then you create a document-level script that checks to see if the JS properties and methods that you need exist. If they do, hide the layer. If not, the layer remains visible. This will allow the file to run in any number of PDF tools that can run JavaScript while showing the warning in the rest of them.

View solution in original post

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 03, 2021 Mar 03, 2021

The way to approach this issue is to add a layer to the PDF that shows the warning that it must be opened in a more capable JavaScript-capable viewer to function properly. The layer should be shown by default. Then you create a document-level script that checks to see if the JS properties and methods that you need exist. If they do, hide the layer. If not, the layer remains visible. This will allow the file to run in any number of PDF tools that can run JavaScript while showing the warning in the rest of them.

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
New Here ,
Mar 04, 2021 Mar 04, 2021

Thank you, Joel! This worked.

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 04, 2021 Mar 04, 2021
LATEST

Thanks - I generally go the extra step of making all of the fields hidden by default so they don't "show through" the layer in some PDF viewers and then make them visible in a JavaScript viewer but that's not absolutely necessary. 

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