Microsoft Edge and JavaScript in PDFs
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
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.

