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

RESOLVED DUPLICATE of bug 787742

Status

Core Graveyard
File Handling
RESOLVED DUPLICATE of bug 787742
5 years ago
2 years ago

People

(Reporter: vcrite, Unassigned)

Tracking

19 Branch
x86_64
Windows 8

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

30.25 KB, image/jpeg
Details
22.72 KB, text/plain
Details
(Reporter)

Description

5 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.
(Reporter)

Updated

5 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
(Reporter)

Comment 1

5 years ago
Created attachment 714751 [details]
Screenshot
(Reporter)

Comment 2

5 years ago
Created attachment 714752 [details]
Scre
Attachment #714748 - Attachment is obsolete: true
Attachment #714751 - Attachment is obsolete: true
(Reporter)

Comment 3

5 years ago
Created attachment 714753 [details]
Screenshot
Attachment #714752 - Attachment is obsolete: true
(Reporter)

Updated

5 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.
(Reporter)

Comment 5

5 years ago
Created attachment 714807 [details]
mimeTypes.rdf

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: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>
(Reporter)

Comment 7

5 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 http://www.education.gov.yk.ca/pdf/pdf-test.pdf ?
(Reporter)

Comment 9

5 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.
(Reporter)

Comment 11

5 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 ?

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
(Assignee)

Updated

2 years ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.