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

Microsoft Edge and JavaScript in PDFs

Explorer ,
Jun 06, 2023 Jun 06, 2023

It appears that some JavaScript in PDFs works under Edge, and some doesn't.  The dropdown setItems() function is an example of a useful function that doesn't work.  It seems to me that this is a huge issue.  How are other Developers coping with Edge's limitations?

TOPICS
JavaScript , PDF , PDF forms
3.8K
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 ,
Jun 06, 2023 Jun 06, 2023

Never expect any scripts to work in any PDF viewer that is not under your control. User's must use an interactive PDF in the tool for which it was intended. If the intended platform has limited JS capabilities, then you have to write the PDF to those abilities, and no more. 

 

One way to for users onto a common platform for online PDFs is to use the "Embed API"

https://developer.adobe.com/document-services/apis/pdf-embed

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
Jun 06, 2023 Jun 06, 2023

Thanks Thom.

"then you have to write the PDF to those abilities, and no more"

Once upon a time our users used IE, and it had no problem with any of our PDFs, even the one that uses OCG layers.  But now we're forced to use Edge.  So now dozens of PDFs that once worked don't, and we have big problem forced upon us.

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 ,
Jun 06, 2023 Jun 06, 2023

It's entirely possible that IE was not the tool that was displaying the PDF, but rather Acrobat. Early browsers did not include PDF viewers, they used an Add-on if one was available. Edge (Chrome) however, does include a primitive PDF viewer. 

But basically,  If you want the users to have a consistent experience, you have to make it so. Look at the Adobe web tools. You can setup the PDF links so they open in the Adobe web viewer. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
Jun 06, 2023 Jun 06, 2023

Thanks again, Thom.  Can you tell me more about the Adobe web viewer?  I did a quick Google, and what I saw seemed to refer to the Edge PDF add-on/extension.

And the "PDF Embed API" you mentioned.  It sounds like one of those big expensive Enterprise-wide applications.  Is that right?

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 ,
Jun 06, 2023 Jun 06, 2023

Follow the link. PDF Embed is free!!  Adobe wants users to like PDF, and inconsistent viewing experience has been a big problem for a while. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
Jun 07, 2023 Jun 07, 2023
LATEST

If I'm not mistaken the PDF Embed makes PDFs more "responsive"--a term familiar to people who do Web pages for devices of all screen sizes.  I don't think it will help us with our JavaScript problem.

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