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

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

Guest
Oct 22, 2019 Oct 22, 2019

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:

http://www.afe.gouv.qc.ca/toutes-les-publications/detail/detail/News/demande-daide-financiere-demand...

1.7K
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 ,
Oct 22, 2019 Oct 22, 2019

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!");

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 ,
Oct 22, 2019 Oct 22, 2019

And of course, you can't force them to open it in Adobe Reader, in case that wasn't clear...

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
LEGEND ,
Oct 22, 2019 Oct 22, 2019
LATEST

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.

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