Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

Can no longer easily view pdf files in firefox

more options

Usually when i clicked on pdf files, they would open in a new tab where i could view them. More recently, it would always ask what to do with the pdf file. Today when i clicked on a pdf file, it asked me again, but when i clicked to open with firefox it just started to open 90+ new blank tabs, untill i forcefully shut down firefox. Up untill today i didn't change the my firefox options, but it just started changing the way it reacts with pdf files. Today i tried changing the files and aplications options to preview in firefox (i read in some firefox articles that this option was suposed to be the one i used to have), but it would still ask what to do with the file, but when i clicked to open in firefox, it would also download. I then changed to open with firefox in the options, but it would just open 90+ new blank tabs. If i tried to always ask (which i find very annoying, considering i spent +1 year without it always asking), it would also download even if i specified not to download but instead open in firefox. When all failed i tried to reset all firefox options, but thje same problems still happened, after that i updated firefox (something i did for the first time), but still the same.

Usually when i clicked on pdf files, they would open in a new tab where i could view them. More recently, it would always ask what to do with the pdf file. Today when i clicked on a pdf file, it asked me again, but when i clicked to open with firefox it just started to open 90+ new blank tabs, untill i forcefully shut down firefox. Up untill today i didn't change the my firefox options, but it just started changing the way it reacts with pdf files. Today i tried changing the files and aplications options to preview in firefox (i read in some firefox articles that this option was suposed to be the one i used to have), but it would still ask what to do with the file, but when i clicked to open in firefox, it would also download. I then changed to open with firefox in the options, but it would just open 90+ new blank tabs. If i tried to always ask (which i find very annoying, considering i spent +1 year without it always asking), it would also download even if i specified not to download but instead open in firefox. When all failed i tried to reset all firefox options, but thje same problems still happened, after that i updated firefox (something i did for the first time), but still the same.

Обране рішення

Some websites might not be sending the correct Content-Type header, which needs to be application/pdf to trigger the PDF Viewer.

One possible workaround for that is my add-on that detects .pdf file extensions and overrides the Content-Type so they open as expected. If you want to test that out:

https://addons.mozilla.org/firefox/addon/content-type-fixer/

By default, it is dormant. Click its Zzzz button on the toolbar to wake it up.

Читати цю відповідь у контексті 👍 1

Усі відповіді (10)

more options

Sounds that you have disabled the builtin Firefox PDF Viewer and have accidentally set Firefox as the application to open PDF files. You should never set Firefox as the application to handle a file when prompted via the open file dialog.

You get tabs opening endlessly if you select Firefox as the application to handle a file when you get an "Open with" dialog.


You can check in "Options/Preferences -> General -> Applications" the setting for Portable Document Format (PDF) file and make sure "Preview in Firefox" is selected.


more options

Hi, i have already tried all of these sugestions, but firefox keeps always asking what to do when i clicked on a pdf. Even if i change Options/Preferences -> General -> Applications ->Portable Document Format (PDF) file, it always asks ehat to do with a pdf file. Whatever i do in the options it never changes.

more options

It is possible that something is wrong with the file that stores the file action.

You can try to rename/remove handlers.json and delete mimeTypes.rdf when present in the Firefox profile folder with Firefox closed to reset all file actions.

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

more options

Ok, so i have tried to do this, i followed your instructions and saw the links you shared. But it still happens the same as before, seems like everything i do changes nothing. After this i tried to reinstall firefox, i deleted the firefox, unistalled and reinstalled firefox, without signing in to my account it still the same as before. What worries me more is that this change to my firefox happened ou of nothing, i didn't change the options and it started acting different, and now i can't seem to change firefox to my preferences.

more options

Did you manage to select "Preview in Firefox" for PDF files ?

Does this also not work if you open a locally saved PDF file in Firefox ?

more options

I always check and select "Preview in Firefox" in the Options, but it is still the same as when i select "Always ask". Now that you mentioned, i checked locally saved pdf files and it doesn't ask if i set "Preview in Firefox", seems like this just happens on pdf files i open on websites.

more options

Вибране рішення

Some websites might not be sending the correct Content-Type header, which needs to be application/pdf to trigger the PDF Viewer.

One possible workaround for that is my add-on that detects .pdf file extensions and overrides the Content-Type so they open as expected. If you want to test that out:

https://addons.mozilla.org/firefox/addon/content-type-fixer/

By default, it is dormant. Click its Zzzz button on the toolbar to wake it up.

more options

By the way, if you haven't done a normal shutdown and restart of Windows since this problem started, you might try that, too, just in case it is a transient issue.

more options

So i updated and restarted windows, but when i tried it still happened the same thing, firefox would ask what to do with pdf files. Next i tried to install the Content-Type Fixer add-on by jscher2000, but it would happen the same as before, as if nothing had changed. So i checked the options in this add-on, i selected one option which said "Allowing viewing in a tab", but this would only make it so if i clicked on the pdf it would download it only (which i thought it was weird since there was an option nex to it: "Force Downloading"). Pretty much at this point i was getting annoyed and i tried every option in this add-on, first i tried the "Force Downloading", but this would only ask what to do with the pdf file, the next options would only do the same thing. After trying pretty much anything and after opening and closing 4 new firefox windows, i tried the "Allow viewing in tab" one last time and it worked. I don't know why this happenned but it did. Did the add-on not work properly in the first window i used it on? I would always check if it was zzzzzz, so i could wake it up before trying anything. For now it is working as it would: opening pdf files in firefox without asking nor downloading them. What it seems to me is that at any moment it could stop working, as it happened and by the first experiences with the add-on.

more options

Hi 2000tjls, there actually are two separate issues:

(1) Content-Type

If the site wasn't specifying application/pdf, the extension would correct that. You can use the log (on the drop-down menu from the button) to check whether that is getting corrected or the site has it right.

(2) Content-Disposition

A site can specify that the content must be downloaded ("attachment" disposition) or it can leave that unstated. The "Allow viewing in tab" setting overrides attachment to "inline" disposition, allowing Firefox to display it in a tab if it knows how to handle that content type.

Some sites might need both of those overrides.