Closed Bug 1308822 Opened 8 years ago Closed 11 months ago

Firefox shows a separate PDF and Portable Document Format option and refuses to open a PDF file

Categories

(Firefox :: File Handling, defect)

47 Branch
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: raingloom42, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160614130443

Steps to reproduce:

I have opened a PDF file from my university, but instead of it being opened for viewing Firefox prompted me to save it. I have tried setting it in the preferences menu, but it shows two entries for PDF:
-"PDF document"
    set to "always ask" or "Firefox (default)"
-"Portable Document Format (PDF)"
    set to "Preview in Firefox"

System: "custom" Arch Linux live image
pretty much matches a 2-3 months old vanilla installation, there are no crazy tweaks, it's just a jumble of programs I need on the go
Addons: lastpass & ublock origin, both are freshly downloaded after boot


Actual results:

Setting the "PDF document" entry to "Firefox (default)" creates an infinite loop where it keeps opening new tabs. Keeping it on "Always ask" provides the option to use an external program (not feasible on my setup) or save (but i want to open it).

Usually PDFs work, but I have noticed that the output of the `file` command is "feladat.pdf: PDF document, version 1.5". I don't know if FF uses this output, but if yes, it may be a bug in `file` or its database.


Expected results:

The PDF document should be displayed in a new tab.
QA Whiteboard: [bugday-20161010]
Component: Untriaged → PDF Viewer
Attachment #8799285 - Attachment mime type: application/download → application/pdf
Does it work with a fresh profile?
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

Are you able to preview the PDF you attached directly in Firefox?
Flags: needinfo?(raingloom42)
Oddly enough it does work with a fresh profile. I don't know which addon could be the culprit out of Ublock and Last Pass.
Flags: needinfo?(raingloom42)

I've been running into this issue (I think) too:

Build ID: 20200403170909
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Depending on the source I get either the Firefox PDF preview or I get prompted to download/open the file in an external application.

One way of reliably causing it to pick "Portable Document Format (PDF)" (as per the application type options, which downloads) rather than "PDF" (which allows preview) is printing from Google Docs. As a counter sample the following link will instead use "PDF" and preview: https://download.brother.com/welcome/doc100670/cv_hll8260cdw_uke_rg.pdf.

Using Firefox's Network monitor shows that google docs generates an application/pdf request, whereas the plain pdf file doesn't generate any output in the monitor (I may well be using the tool incorrectly though).

IMHO both cases should be treated the same as from the end user's perspective they are doing the same thing.

Quick addendum: The file the reporter attached opens in Firefox's preview for me, so I may be seeing a different issue - please let me know if you want a new issue opened. Also, my testing was done on a clean profile.

Severity: normal → --
Component: PDF Viewer → File Handling

Unfortunately there isn't enough information here to do anything.

If someone's still seeing this, it would be useful to see a copy of handlers.json from the affected Firefox profile.

The infinite loop sounds like bug 167320. This behaviour should be a lot better these days - if you still see that on a recent copy of Firefox, please file a new bug.

Status: UNCONFIRMED → RESOLVED
Closed: 11 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: