How do I open PDFs using the built-in viewer? (Windows 8.1)
Whenever I try to open a PDF I get the pop-up dialogue "You have chosen to open *.pdf What should Firefox do with this file?" And viewing in Firefox isn't one of the options. I'm sure that what used to happen is that there was no dialogue and the PDF just opened in the built-in pdf.js viewer. So something is wrong with my profile I guess.
I have tried the instructions here: https://support.mozilla.org/en-US/kb/view-pdf-files-firefox-without-downloading-them
I've checked through all my extensions and don't have any that open PDFs (I have uBlock, NoScript and Zotero). I have completely uninstalled Adobe Reader. I have checked that in Preferences/Applications, PDF is set to "Preview in Firefox". I have made I have also gone through about:config and changed all the settings with "pdf" in them back to their default value But none of those things work.
Is there anything else I can try to get this working?
الحل المُختار
I think that the problem I had was that some PDFs are served by websites with a "header" (I don't really know what this means) called "Content-Disposition:attachment", and when that happens Firefox refuses to load them in the built-in PDF viewer. (I don't know why websites do this.)
This is very unhelpful, especially because Firefox gives no indication as to what is going on (why the user's preference concerning PDFs is not being respected). I just thought that the PDF viewer was broken, and spent hours trying to fix it.
If anyone else runs into this problem, there is an extension which fixes it: https://addons.mozilla.org/en-us/firefox/addon/inlinedisposition/
There is a bug open in Bugzilla about this: https://bugzilla.mozilla.org/show_bug.cgi?id=773942
As far as I can see, it would be trivial to incorporate the above extension's changes into Firefox. Some people in the bug say that this would be a bad thing to do for security reasons. But Firefox should at least present the user the option to open the PDF in the built-in viewer, or even more minimally present some explanation of why the PDF is not being opened in the viewer, e.g. "This PDF was marked as a download, so for security reasons it has not been opened in the built-in viewer". That would save people like me, who don't know about complicated HTTP headers, from just thinking that Firefox is broken.
Read this answer in context 👍 1All Replies (3)
الحل المُختار
I think that the problem I had was that some PDFs are served by websites with a "header" (I don't really know what this means) called "Content-Disposition:attachment", and when that happens Firefox refuses to load them in the built-in PDF viewer. (I don't know why websites do this.)
This is very unhelpful, especially because Firefox gives no indication as to what is going on (why the user's preference concerning PDFs is not being respected). I just thought that the PDF viewer was broken, and spent hours trying to fix it.
If anyone else runs into this problem, there is an extension which fixes it: https://addons.mozilla.org/en-us/firefox/addon/inlinedisposition/
There is a bug open in Bugzilla about this: https://bugzilla.mozilla.org/show_bug.cgi?id=773942
As far as I can see, it would be trivial to incorporate the above extension's changes into Firefox. Some people in the bug say that this would be a bad thing to do for security reasons. But Firefox should at least present the user the option to open the PDF in the built-in viewer, or even more minimally present some explanation of why the PDF is not being opened in the viewer, e.g. "This PDF was marked as a download, so for security reasons it has not been opened in the built-in viewer". That would save people like me, who don't know about complicated HTTP headers, from just thinking that Firefox is broken.
In Application Settings if you change PDF to "Preview in Firefox" does this still ask you to choose an application?
Also see: Applications panel - Set how Firefox handles different types of files
guigs said
In Application Settings if you change PDF to "Preview in Firefox" does this still ask you to choose an application? Also see: Applications panel - Set how Firefox handles different types of files
I have a similar problem. In Options-applications, there is only one listing for PDF and it IS set to Preview in Firefox, but PDF viewer doesn't work with certain PDFs (opens a dialog box to ask if I want to open or save etc), but is fine with others. An example of one that won't display in FF is at http://www.amnh.org/explore/curriculum-collections/dinosaurs-ancient-fossils-new-discoveries/what-is-a-dinosaur (the PDF link is http://www.amnh.org/content/download/47000/721790/file/dino_01_what_is.pdf)