X
Tap here to go to the mobile version of the site.

Support Forum

Opening downloaded in Mozilla PDFs in Mozilla

Posted

I'm browsing Internet in Mozilla. I see a link to PDF file and click on it. Mozilla asks me whether I want to save it or open in some program. But Mozilla has built-in PDF reader - why there's no option "open in Mozilla"? If I want to open the document in the same browser, I have to find it's EXE file in file manager - and if I don't select it as a default reader, after downloading another file I have to find your program again.

I'm browsing Internet in Mozilla. I see a link to PDF file and click on it. Mozilla asks me whether I want to save it or open in some program. But Mozilla has built-in PDF reader - why there's no option "open in Mozilla"? If I want to open the document in the same browser, I have to find it's EXE file in file manager - and if I don't select it as a default reader, after downloading another file I have to find your program again.

Additional System Details

Installed Plug-ins

  • Shockwave Flash 26.0 r0

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

More Information

Scribe 689 solutions 3329 answers

Helpful Reply

Hi, please make sure you are set to Preview in Firefox -

If your question is resolved by this or another answer, please take a minute to let us know. Thank you!

Hi, please make sure you are set to Preview in Firefox - *[[How to disable the built-in PDF viewer and use another viewer]] *[[View PDF files in Firefox]] ''If your question is resolved by this or another answer, please take a minute to let us know. Thank you!''

Question owner

It was already set to "preview in Firefox" - some files used to open in Firefox, but some don't. I don't know what it depends on.

It was already set to "preview in Firefox" - some files used to open in Firefox, but some don't. I don't know what it depends on.
Scribe 689 solutions 3329 answers

Try setting any other reader you have to Never Activate - Add-ons Manager (Ctrl+Shift+A) > Plugins

Try setting any other reader you have to Never Activate - Add-ons Manager (Ctrl+Shift+A) > Plugins

Question owner

I don't have any other readers as Mozilla plugins displayed there. Maybe I had Adobe.

I don't have any other readers as Mozilla plugins displayed there. Maybe I had Adobe.
cor-el
  • Top 10 Contributor
  • Moderator
16561 solutions 149516 answers

Helpful Reply

Only files send as application/pdf will Firefox open in a tab. If the server sends another content-type then you get a download (open with) dialog.

Only files send as application/pdf will Firefox open in a tab. If the server sends another content-type then you get a download (open with) dialog.

Question owner

How does it work? If I click on a link to a PDF file (with .pdf extension), how can there be other content types? Please add an option in download window to open in Mozilla (not only PDFs, but also every other formats you support).

How does it work? If I click on a link to a PDF file (with .pdf extension), how can there be other content types? Please add an option in download window to open in Mozilla (not only PDFs, but also every other formats you support).
WestEnd
  • Top 10 Contributor
54 solutions 2911 answers

Have you tried FoxIt?

Have you tried FoxIt?
Pkshadow
  • Top 10 Contributor
1062 solutions 14771 answers

If think it is a Firefox issue : uninstall Firefox. Then Delete the Mozilla Firefox Folders in C:\Program Files and C:\Program Files(x86) Then restart system. Then run Windows Disk Cleanup. (Note: This should be Pinned and run Weekly, If never done below expect 10's of gig's) Then run it again and click the button that says Cleanup System Files. Note: your Firefox Profile is saved. But you should make a back up before you do :

Reinstall with Current Release Firefox 57.0.4 with a Full Version Installer

Please let us know if this solved your issue or if need further assistance.

If think it is a Firefox issue : uninstall Firefox. Then Delete the Mozilla Firefox Folders in C:\Program Files and C:\Program Files(x86) Then restart system. Then run Windows Disk Cleanup. (Note: This should be Pinned and run Weekly, If never done below expect 10's of gig's) Then run it again and click the button that says Cleanup System Files. Note: your Firefox Profile is saved. But you should make a back up before you do : *https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles *https://support.mozilla.org/en-US/kb/export-firefox-bookmarks-to-backup-or-transfer Reinstall with Current Release Firefox 57.0.4 with a Full Version Installer *https://www.mozilla.org/firefox/all/ Please let us know if this solved your issue or if need further assistance.
jscher2000
  • Top 10 Contributor
7685 solutions 62576 answers

qwertyuiop1234567890 said

How does it work? If I click on a link to a PDF file (with .pdf extension), how can there be other content types?

You would be surprised what websites will send as the content type for a file. Sometimes they will send application/download or application/octet-stream because they want to force the file to open outside of the browser.

Please add an option in download window to open in Mozilla (not only PDFs, but also every other formats you support).

You can submit suggestions for new/changed features here: https://qsurvey.mozilla.com/s3/FirefoxInput/

Here's the question: how would Firefox know that a file with a .pdf extension is really a PDF if the server doesn't attach the proper content-type header? Or what if the extension is php, jsp, or aspx? Some programs "sniff" the beginning of a file to make an independent judgment of the content type, but Mozilla has resisted doing that.

''qwertyuiop1234567890 [[#answer-1061707|said]]'' <blockquote> How does it work? If I click on a link to a PDF file (with .pdf extension), how can there be other content types?</blockquote> You would be surprised what websites will send as the content type for a file. Sometimes they will send application/download or application/octet-stream because they want to force the file to open outside of the browser. <blockquote>Please add an option in download window to open in Mozilla (not only PDFs, but also every other formats you support). </blockquote> You can submit suggestions for new/changed features here: https://qsurvey.mozilla.com/s3/FirefoxInput/ Here's the question: how would Firefox know that a file with a .pdf extension is really a PDF if the server doesn't attach the proper content-type header? Or what if the extension is php, jsp, or aspx? Some programs "sniff" the beginning of a file to make an independent judgment of the content type, but Mozilla has resisted doing that.
cor-el
  • Top 10 Contributor
  • Moderator
16561 solutions 149516 answers
See also: *https://developer.mozilla.org/How_Mozilla_determines_MIME_Types *https://blog.mozilla.org/security/2016/08/26/mitigating-mime-confusion-attacks-in-firefox/

Question owner

https://developer.mozilla.org/pl/How_Mozilla_determines_MIME_Types - not found
cor-el
  • Top 10 Contributor
  • Moderator
16561 solutions 149516 answers

You appear to be redirected to a locale (pl) that doesn't exist.

You appear to be redirected to a locale (pl) that doesn't exist. *https://developer.mozilla.org/en-us/How_Mozilla_determines_MIME_Types

Question owner

WestEnd said

Have you tried FoxIt?

Have you read my question carefully? I'm not looking for an external program for reading PDFs - I want to open them in Mozilla, because it already has a built-in reader. The fact that it also has a fox in the name doesn't mean that it's produced by Mozilla. Foxit reader is a closed-source program, so it's dangerous for privacy. It's also not so useful, because it doesn't support horizontal scrolling by tilting mouse's wheel (my mouse has this function and it works in Mozilla) and when foxit opens a file, it blocks the ability to change it (i.e. when I edit a document, export it to PDF and open in foxit, but then decide to change something, I have to close foxit, because otherwise I can't overwrite the file).

''WestEnd [[#answer-1061755|said]]'' <blockquote> Have you tried FoxIt? </blockquote> Have you read my question carefully? I'm not looking for an external program for reading PDFs - I want to open them in Mozilla, because it already has a built-in reader. The fact that it also has a fox in the name doesn't mean that it's produced by Mozilla. Foxit reader is a closed-source program, so it's dangerous for privacy. It's also not so useful, because it doesn't support horizontal scrolling by tilting mouse's wheel (my mouse has this function and it works in Mozilla) and when foxit opens a file, it blocks the ability to change it (i.e. when I edit a document, export it to PDF and open in foxit, but then decide to change something, I have to close foxit, because otherwise I can't overwrite the file).
jscher2000
  • Top 10 Contributor
7685 solutions 62576 answers

Hi qwertyuiop1234567890, can you give a link to a file that has this problem? There are two primary issues:

(1) Content-Type header

Does the server indicate that the file is application/pdf -- the type that Firefox recognizes under the Portable Document format (PDF) content type?

(2) Content-Disposition header

Does the server override Firefox's normal behavior to open PDFs in a tab by specifying that the file should be downloaded instead?

You can compare "inline" disposition and "attachment" (forced download) disposition using these examples:

Direct link (inline disposition): https://jeffersonscher.com/res/Mixed_Content_Blocking.pdf

Scripted download link (attachment disposition): https://jeffersonscher.com/res/servepdf.php?f=Mixed_Content_Blocking.pdf

Hi qwertyuiop1234567890, can you give a link to a file that has this problem? There are two primary issues: (1) Content-Type header Does the server indicate that the file is '''application/pdf''' -- the type that Firefox recognizes under the Portable Document format (PDF) content type? (2) Content-Disposition header Does the server override Firefox's normal behavior to open PDFs in a tab by specifying that the file should be downloaded instead? You can compare "inline" disposition and "attachment" (forced download) disposition using these examples: Direct link (inline disposition): https://jeffersonscher.com/res/Mixed_Content_Blocking.pdf Scripted download link (attachment disposition): https://jeffersonscher.com/res/servepdf.php?f=Mixed_Content_Blocking.pdf