Firefox 31 steals the pdf file association

History

Firefox uses the builtin pdf.js to display PDF documents when you click on a link that points to a PDF file.

"pdf.js is a JavaScript library intended to render PDF files" (Wikipedia).

It was included in Firefox in version 15, and is enabled by default since version 19.

Plan

Mozilla planned to let Firefox declare itself the default handler for pdf files only if there is no other handler installed yet.

Current state

Firefox 31 does in many cases declare itself the default handler for PDF, although another program already is responsible for pdf, even if the original Adobe Reader is installed.

Comment 3 of bug 1049521 suggests that the issue is related to windows having different defaults: One global default setting for all users, and an indivivual one for each user. Adobe Reader sets itself default for all users, Firefox appears to check only if a pdf handler is declared for the current user, under which the installer is being run.

Workaround

One way to prevent this from happening during install seems to be to manually declare Firefox the default browser for all users, and then forbid it to ask every user to make Firefox default for that user. This also stops it from making itself the default for pdf.

To do this, remove the checkmark when the installer of Firefox asks to make itself the default, later run the helper.exe command from the uninstall directory with the command line option /SetAsDefaultAppGlobal, and add this line to your autoconfig file:
pref("browser.shell.checkDefaultBrowser", false);

Do not just run the helper.exe without options, this would uninstall Firefox. Cut and paste this into a file named SetFirefoxDefault.cmd, then double-click that file:

set progdir=%PROGRAMFILES(X86)%
if "%progdir%"=="" set progdir=%PROGRAMFILES%
"%progdir%\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal

If the icon of this file looks like from a text file, then the settings of your Windows Explorer do not allow you to to rename it to cmd, it always adds txt to the name without showing it.

Modified Registry Keys

Firefox overwrites this registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf]
""="FirefoxHTML"

From there it travels to HKCU\Software\Classes\.pdf of each user.

If you have Adobe Reader 11.0.10, that registry key should instead look like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf]
@="AcroExch.Document.11"
"Content Type"="application/pdf"

[HKEY_CLASSES_ROOT\.pdf\OpenWithList]
@=""

[HKEY_CLASSES_ROOT\.pdf\OpenWithList\AcroRd32.exe]
@=""

[HKEY_CLASSES_ROOT\.pdf\PersistentHandler]
@="{F6594A6D-D57F-4EFD-B2C3-DCD9779E382E}"

[HKEY_CLASSES_ROOT\.pdf\ShellEx]

[HKEY_CLASSES_ROOT\.pdf\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{49400A7C-81A8-4F52-8CCE-D54739EE87EC}"

Howto Disable PdfViewer in Firefox

I recommend to completely disable PDF.js, because it is slow and buggy, and because I do not like the idea to code highly complex tasks in javascript, if there are already very good native programs available for that task:

pref("pdfjs.disabled", true);
pref("plugin.disable_full_page_plugin_for_types", "");


Impressum