Èròjà atẹ̀lélànà yii ni a ti fi pamọ́ fọ́jọ́ pípẹ́. Jọ̀wọ́ béèrè ìbéèrè titun bí o bá nílò ìrànwọ́.
"could not open pdf file"
I get the error "could not open file" after downloading a pdf file in Firefox for Android. This happens for most, but not all, pdf files. It seems Firefox does not use the default Android pdf viewer. In chrome it works perfectly. Before this error occurred the pdf file was opened in a navigation app, useless.... I tried many things: Changing default pdf app in android Removing the navigation app. Reinstalling Firefox Installing Firefox nightly, Trying to Change the default pdf viewer in about:config (not possible in Firefox daylight). Unable to change this. How to fix this bug? Why doesn't Firefox use the default pdf viewer of android? Thanks!
All Replies (11)
If you look at the download using a file manager app, does it have a .pdf extension on the name? If not, that might be the reason that the wrong app is used.
Yes, it has a pdf extension. For example this file was tested : https://manuals.coolblue.nl/0f/aeg-l8fb86es-aeg-t8db86es.pdf
Yes it does have a pdf extension.
Many pdf files open properly, but for example this "handleiding" pdf file on this site doesn't. https://www.coolblue.nl/product/735246/aeg-l8fb86es.html Links to : https://manuals.coolblue.nl/0f/aeg-l8fb86es-aeg-t8db86es.pdf
In chrome this file opens normally.
Firefox for Android will not be able to open your .pdf file. You will need to use a standalone .pdf viewer application.
The point is, most online pdf files are nicely opening in Adobe reader, except the above mentioned pdf, for which Firefox for Android only gives the described error message. Why is this pdf file not opening like other pdf files in an external viewer? This is unwanted behavior of the browser...
The manual is served with
This is a generic executable file type that sites sometimes associate with PDFs to force them to be downloaded instead of opened in a tab. I think that is causing the problem that Firefox doesn't open them in an appropriate application. It would be preferable if Firefox were to "forget" that useless information and ask Android what to do with a .pdf file.
PDFs served with the correct Content-Type for a PDF (application/pdf) should open just fine.
Fully agree, thanks! As this reading by firefox of the value "content-type: application/octet-stream" results in the inability to (quickly) open a pdf file, this is a bug. I hope the developers will indeed implement in firefox to ignore that useless information. The user should decide how to open a pdf, not the site.
I am glad to hear that your problem has been resolved. If you haven't already, please select the answer that solves the problem. This will help other users with similar problems find the solution.
Thank you for contacting Mozilla Support.
Hmm, I think it is explained but not solved. Perhaps the Question owner should create a new issue related to downloads served with the content type application/octet-stream so they can be handled according to their file extension??