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.
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
Created attachment 714752 [details] Scre
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.
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:fileExtensions="pdf" NC:description="Adobe Acrobat Document" NC:value="application/acrobat" NC:editable="true"> <NC:handlerProp RDF:resource="urn:mimetype:handler:application/acrobat"/> </RDF:Description>
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 http://www.education.gov.yk.ca/pdf/pdf-test.pdf ?
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.
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 ? Reporter: 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
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 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.