Skip to main content
Known Participant
June 6, 2023
Question

Microsoft Edge and JavaScript in PDFs

  • June 6, 2023
  • 1 reply
  • 4981 views

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?

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
June 6, 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 PDFScriptingUse the Acrobat JavaScript Reference early and often
pdc@TDAuthor
Known Participant
June 6, 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.

Thom Parker
Community Expert
Community Expert
June 6, 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 PDFScriptingUse the Acrobat JavaScript Reference early and often