I'm trying to view a Pdf file that I found online.
Normally, when I attempt to open a Pdf file, Firefox displays it in its default Pdf viewer (called pdfjs, I believe). This is good and normal behavior.
However...
with this specific Pdf that I found online, I click the link to its location, and Firefox brings up the download dialog. It describes the file as a "binary file", even though the file is a Pdf that I can download and view natively.
I'm assuming the web-server is "not telling" Firefox that this Pdf file is, in fact, a Pdf file. So Firefox can only assume that it is a "binary file".
This spurred me to wonder the question...
If I were to ever encounter this annoyance again, instead of downloading the file, can I force Firefox to open a file (online or otherwise) in its default Pdf viewer?
Attempted Solutions:
- I tried the answer from How to call firefox built-in pdf viewer (pdf.js) manually?, but to no avail. Firefox just attempts to download the "binary file".
- I added
view-source:
to the beginning of the Pdf's location (i.e.view-source:https://www.website.com/pdf.pdf
), I just get the raw ASCII text displayed of the Pdf file.
PS: I'm using Firefox 48.0.2 ...
Yes, it's old....
As requested:
download
HTML5 attribute.<a href="document.pdf" download="document.pdf">Download here!</a>
. This will force your browser to save the file instead of opening it like it would normally. – Michael Frank May 28 '19 at 20:41<a href="document.pdf">PDF</a>
. – I_Don't_Code May 28 '19 at 20:47content-disposition
. There's a good reason to do this with certain PDFs, like forms or receipts, where you want the user to save the document somewhere appropriate and not in atemp
folder where files that open in browser are put by default. Anyway, you're asking for solutions and workarounds, but I'm not so sure there will be one. – Michael Frank May 28 '19 at 20:56