Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Is there an easy way to detect wether the new internal PDF-Viewer of Firefox is the primary PDF-Viewer or not.

  • 11 replies
  • 15 have this problem
  • 4 views
  • Last reply by user633449

more options

I am providing PDF-Documents with Inputfields for a user to enter values. The Problem is, that the new internal PDF-Viewer for Mozilla is not able to give that functionallity. This I know and I can accept. But I would like to check if the User is trying to open the PDF with Adobe Acrobat Reader or the internal PDF-Viewer so that I can send a warning before the user opens the PDF.

My Question is: Is there a value that i can read in via JavaScript to detect with what application Mozilla Firefox is trying to open my PDF. In Chrome for Example it is possible to get that information via the navigator plugin. But it isn't working in Mozilla.

If there is no such possibility at the moment, is there anything like that planned?

I am providing PDF-Documents with Inputfields for a user to enter values. The Problem is, that the new internal PDF-Viewer for Mozilla is not able to give that functionallity. This I know and I can accept. But I would like to check if the User is trying to open the PDF with Adobe Acrobat Reader or the internal PDF-Viewer so that I can send a warning before the user opens the PDF. My Question is: Is there a value that i can read in via JavaScript to detect with what application Mozilla Firefox is trying to open my PDF. In Chrome for Example it is possible to get that information via the navigator plugin. But it isn't working in Mozilla. If there is no such possibility at the moment, is there anything like that planned?

All Replies (11)

more options

See also:

  • bug 739043 - Can't fill fillable PDF forms with PDF Viewer

(please do not comment in bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html; you can vote instead to show your interest)

more options

You are using Firefox 18, which does not have the new pdf reader in it yet. Firefox 19 will have it.

more options

You are right, which is the reason why i will get the problem with Firefox 19. It is correct, that so far this matter has not been an issue. But with Firefox 19 the internal PDF-Viewer will be enabled by default.

I am testing on a Firefox 18 because the internal viewer is already integrated. The Viewer can be activated by going to

about:config and changing the value pdfjs.disabled false.

I am aware that I can enable / disable the internal Viewer with that flag.

But that only works for my browser. I was hoping that there is a possibility to check if a browser, who is visiting my site, has this flag set to false and therefor uses the internal viewer. So that I will not have to show a warning to those browsers already using the Adobe Acrobat Reader plugin.

more options

The filling in option is obviously getting consideration

The main problem with forms is not so much filling them out (we already have a working prototype, see ....  as much as what to do after the form is filled out (print vs. save PDF). (c4)

No indication of progress though, so it will likely mean the pdf read feature is going to be enabled without a fill in facility.

we should request feedback from Aadib, when he wants/can work on it. (c10)

That leaves unanswered

My Question is: Is there a value that i can read in via JavaScript to detect with what application Mozilla Firefox is trying to open my PDF. In Chrome for Example it is possible to get that information via the navigator plugin. But it isn't working in Mozilla.

If there is no such possibility at the moment, is there anything like that planned?

Maybe it requires a bug.

more options

It appears work on the existing bug has (temporarily I hope) stalled at present.

more options

I also have the same need.

The Firefox PDF viewer does not suit my needs, never mind why or what. What is important is I need to know whether or not my customers who use Firefox have Adobe ENABLED as the browser's reader (one can have Adobe installed without having it set as Firefox's default PDF viewer).

Yes I know HOW to change the settings, but that is not what I need to know. I need to know if my customers have it enabled.

So Mozilla, how about you help me fix the problem you created for all my customers?

more options

There is a related bug, that would suggest it is not possible to detect the Firefox status.

  • see also /questions/950946?page=2#answer-413117
  • Bug 845740 - The web site should be able to suggest that Firefox not to use the built-in PDF viewer
  • note you should not comment in such a bug (unless you are a developer wishing to work on it ! ) however you may vote for it.

I suspect the bug will not get anywhere.

Developers will not read this forum, to make your opinions known try any, or all of these methods:

  1. vote on bugs,
  2. look for a mailinglist or forum that developers use, and where it appears to be an on-topic subject http://www.mozilla.org/about/forums/#general-development
  3. comment in the feedback http://input.mozilla.org/en-US/feedback
more options

Firefox doesn't appear to make the integrated PDF viewer detectable via the navigator.plugins object.
So if a check of navigator.plugins doesn't show a plugin that can handle PDF then it is possible that the integrated PDF viewer will be used.
I don't know if this can possibly work.

more options

This is actually an approach I am using at the moment to detect wether a user should enable / install Adobe Acrobat. However since a good majority of the current FF 19 browsers out there will not have been newly installed, but rather updated from version 18 to 19, in which they used Adobe Reader, the Adobe Reader plugin of these browsers is left active. Mozilla just changed the application used to open PDFs. This makes the assumption that if Adobe Reader plugin is present it automatically is the used application difficult. I guess it should be mentioned, that Chrome for example only allows to either their Viewer or the Acrobat Reader Plugin to be enabled.

more options

(My personal opinion only)

Possibly Firefox development sometimes strives to match or improve on other browser's features.

Development policy may not be to disable the builtin viewer but could take more kindly to a suggestion of not having both enabled at the same time. It may be worth filing a bug for that if no-one has already done so.

After all this must be causing many users and many websites problems, and such, the requested feature could be considered a regression fix, rather than an enhancement.

Modified by John99

more options

If there are specific issues you are having with the PDF.js viewer, please use bugzilla.mozilla.org to report them. You could also try using Firefox beta, which already has fixes for the viewer. There is no realy reliable way to detect if users are using it, plus you want to leave it up to the user to decide what they should use to view PDF's.