為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How do I open PDFs using the built-in viewer? (Windows 8.1)

  • 3 回覆
  • 3 有這個問題
  • 4 次檢視
  • 最近回覆由 cfcentaurea

more options

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?

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.

從原來的回覆中察看解決方案 👍 1

所有回覆 (3)

more options

選擇的解決方法

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.

more options

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

more options

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)