Javascript to force usage of Acrobat Reader (instead of Chrome PDF Viewer)

Copy link to clipboard
Copied
We have a PDF form with QR code (PDF has reader extension) that our customer needs to fill using Acrobat Viewer. If they use Chrome PDF Viewer, the QR code doesn't work (this is a known problem at Adobe). I can suggest the user to first download the PDF and then to open it in Acrobat Viewer, but I have no control over the user's actions. I can also suggest to change the settings within Chrome, but I have no control over the client's settings. In fact, most users ignore de suggestions and fills in the form directly on Chrome PDF Viewer.
My question is: is it possible to have a script (on the PDF, on the web site where the PDF is or else) to validate what reader is used and report an erreur to the user when not using Acrobat Reader? What's the best practice to get around this issue?
PS: Here's the web site, click on "Télécharger le document" at the bottom:
Copy link to clipboard
Copied
In the case of Chrome it's possible (to some extent) because the developers implemented a unique viewerType string for it.
So you can use this code as a doc-level script to warn the user, but you can't close the file:
if (app.viewerType=="pdfium") app.alert("It is not recommended to open this file in Chrome!");
Copy link to clipboard
Copied
And of course, you can't force them to open it in Adobe Reader, in case that wasn't clear...
Copy link to clipboard
Copied
The problem is much bigger than you have said. Your file might be viewed in
Chrome - will not show QR code
Firefox - will not show QR code
Edge - will not show QR code
Internet Explorer - will show QR code if Acrobat Reader is installed, otherwise will download
Safari (main browser on Mac) - MIGHT show QR code, if Acrobat Reader is installed, or might show it without QR code
iPhone, iPad, Android - will not show QR code, even if the user downloads it and opens in the Reader app.
Yes, you can tell a user to download the file and open it in Reader. But perhaps up to now they have not needed Acrobat Reader. Perhaps they don't want to install software. Perhaps they are not allowed to install software. And perhaps like more than 50% of people they are on phone or tablet so there is nothing they can do to use your file. A server solution would be much better.

