Firefox with built in PDF viewer won't open PDFs from computer's own hard drive



6 years ago
3 years ago


(Reporter: vcrite, Unassigned)


19 Branch
Windows 8

Firefox Tracking Flags

(Not tracked)



(2 attachments, 3 obsolete attachments)

30.25 KB, image/jpeg
22.72 KB, text/plain


6 years ago
Created attachment 714748 [details]
Screenshot of dialog box

User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130212082553

Steps to reproduce:

From a computer, do either of the following:
Option A:
Within Firefox, select Firefox menu --> New Tab --> Open File, and open a PDF file on the computer's hard drive.
Option B:
From Windows explorer, right click a PDF file.  Select "Open With."  Then choose Firefox.

Actual results:

Firefox shows a dialog box that states "Opening".. followed by PDF file name.  The dialog box prompts user to select what program to open use to open the PDF.  Selecting to open with Firefox opens the same dialog box again.

Expected results:

Firefox should attempt to display the PDF file with the built in PDF viewer.


6 years ago
Component: Untriaged → PDF Viewer
Summary: Firefox with built in PDF viewer won't open PDFs on hard drive → Firefox with built in PDF viewer won't open PDFs from computer's own hard drive

Comment 1

6 years ago
Created attachment 714751 [details]

Comment 2

6 years ago
Created attachment 714752 [details]
Attachment #714748 - Attachment is obsolete: true
Attachment #714751 - Attachment is obsolete: true

Comment 3

6 years ago
Created attachment 714753 [details]
Attachment #714752 - Attachment is obsolete: true


6 years ago
Version: 20 Branch → 19 Branch
Can you please attach your mimetypes.rdf file from your profile ?
The profile can be very easy found if you open about:support (enter as URL) and click the show profile button.

Comment 5

6 years ago
Created attachment 714807 [details]

As requested
Attachment #714807 - Attachment mime type: application/octet-stream → text/plain
Can you please rename the file mimetypes.rdf in your profile (e.g. to mimetypes.old) while Firefox is closed.

Does it work now ?

This seems to be caused by this entry at the top of your mimetypes.rdf:
 <RDF:Description RDF:about="urn:mimetype:application/acrobat"
                   NC:description="Adobe Acrobat Document"
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/acrobat"/>

Comment 7

6 years ago
Tried the suggested change and the dialog box still shows up.  The only difference is that dialog box prompts to open with Adobe Reader instead of prompting to open with Firefox.
PDFs are opening in the internal viewer if you open for example ?

Comment 9

6 years ago
With mimetypes.rdf replaced, dialog box shows up.  With the original mimetypes.rdf, the internal PDF viewer loads the PDF on the noted link.
Use the replaced mimetypes.rdf and set tools/options/applications/Portable Document Format (pdf) to Preview in Firefox.

Comment 11

6 years ago
Yes, that appears to have fixed it, viewer is opening local PDFs and web based PDFs.

Based on looking at the original mimetypes.rdf, there are two other entries for PDF that show up.  Those other entries cannot be set to Preview in Firefox.
Don't we have an internal list of known mime-types that should override wrong entries in mimetypes.rdf ?

Your problem is easy explained. Everything on the web depends on mime-types (and not for example on file extensions) and that is the reason why the file handling in Firefox is based on the mime.types. 
Wrong mime-type<>extension mappings can be saved in the mimetypes.rdf in case that a webserver sends a pdf file with a different (wrong) mime-type and you decide that firefox should save the decision what to do with the file.

Viewing a PDF file from a resource that is not providing a mime-type like the local file system or a ftp server is a problem. In that case Firefox tries to find the mime-type based on the file extension or a magic number. 
In your case firefox used the mimetpyes.rdf for the mime-type detection and returned the wrong mime-type "application/acrobat" for the pdf file extension. 
The PDF viewer supports only application/pdf and that is the reason why you got the file save as window.
Component: PDF Viewer → File Handling
Product: Firefox → Core
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 787742
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.