为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

PDF downloads when opened in a new tab

more options

When I click on a pdf normally to open it, it previews in Firefox like it's supposed to. However, when I try to open them in a new tab, it automatically downloads it to my computer instead of previewing it. What do I do to keep it from downloading if I want multiple tabs with pdfs open?

When I click on a pdf normally to open it, it previews in Firefox like it's supposed to. However, when I try to open them in a new tab, it automatically downloads it to my computer instead of previewing it. What do I do to keep it from downloading if I want multiple tabs with pdfs open?

所有回复 (7)

more options

The PDF issue is due to a Firefox update that automatically set PDFs to open and download.

To fix that, you just need to update your Firefox settings. From the Mozilla Help Page, here are the steps to do that :

PC Users:

  • Bulleted list itemClick the menu button (the three grey bars in the toolbar), or click "Options" in the header menu.
  • Bulleted list itemSelect "Options." In the pictorial menu, it's a gear icon.
  • Bulleted list itemSelect "Applications" from the header tabs.
  • Bulleted list itemFind Portable Document Format (PDF) in the list and click on it to select it.
  • Bulleted list itemClick on the drop-down arrow in the Action column for PDFs and select "Preview in Firefox". That will set your Firefox browser to display the PDF instead of saving or downloading it.

Mac Users:

  • Bulleted list itemClick the menu button (the three grey bars in the toolbar), or click "File" in the header menu.
  • Select "Preferences." In the pictorial menu, it's a gear icon.
  • Select "Applications" from the header tabs.
  • Bulleted list itemFind Portable Document Format (PDF) in the list and click on it to select it.
  • Bulleted list itemClick on the drop-down arrow in the Action column for PDFs and select "Preview in Firefox". That will set your Firefox browser to display the PDF instead of saving or downloading it.
more options

I had already done all that, and it works when I click on a PDF link, but when I try to open a PDF link in a new tab, then it starts downloading.

more options

Try this also see if it's work:

Reset the browser.newtab.url pref.

Go to about:config via your Address Bar Press the button saying you'll be careful Search for browser.newtab.url Right click -> Reset You might also want to check for any prefs Trovi has set. Search for trovi and reset all prefs (Right click -> Reset) You might have to restart Firefox for this to work.

more options

How do you open the PDF file in a new tab?

Previewing in Firefox usually only works if the server sends the file as application/pdf. If the server sends the file otherwise then you get an 'open with' download dialog.

more options

Adib Obaid said

Try this also see if it's work: Reset the browser.newtab.url pref. Go to about:config via your Address Bar Press the button saying you'll be careful Search for browser.newtab.url Right click -> Reset You might also want to check for any prefs Trovi has set. Search for trovi and reset all prefs (Right click -> Reset) You might have to restart Firefox for this to work.

Couldn't find it

more options

cor-el said

How do you open the PDF file in a new tab? Previewing in Firefox usually only works if the server sends the file as application/pdf. If the server sends the file otherwise then you get an 'open with' download dialog.

Iin the past, whenever I would open a PDF link in a new tab, it would open it in the PDF viewer. I don't know if I had a particular add on or something that allowed that before the firefox update, but if that's the case, then I guess I can't do anything after all.

more options

In addition to the above issues:

If a link/button will open a PDF in the same tab with a simple left click, then you should be able to direct it to open in a separate tab using any of the usual methods. But if the server instructs Firefox to download it rather than displaying it "inline" then that is more challenging to handle.

There is an old extension that might work for you, but from the description it seems to affect ALL kinds of requests and not just PDFs, so that might be inconvenient when you're downloading other kinds of files (always have to right-click > Save Link As). Also, it's not compatible with future versions of Firefox:

https://addons.mozilla.org/firefox/addon/inlinedisposition-reloaded/