Closed 365ging closed 2 years ago
PDFObject never forces PDFs to download. In my experience, if the PDF is no longer displaying inline, and is automatically downloading, it's usually due to the server's Content-Disposition
header settings. Check your server and/or the server-side code that requests the file and ensure Content-Disposition
for PDFs is set to inline
and not attachment
. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition for details.
Some browsers also enable users to change how PDFs are handled. For example https://support.mozilla.org/en-US/kb/view-pdf-files-firefox-or-choose-another-viewer I once accidentally set Firefox to automatically download PDFs instead of rendering in a new tab (though this shouldn't affect PDFs embedded via PDFObject within an HTML page).
Good luck
This week the PDFObject that I have had implemented for a few years started not rendering in any browser and automatically downloading. The url that I'm using is from Azure Blob Storage. I have not changed the code at all. Is there any reason this would be happening?