Embedding vs downloading PDFs recently broken
Categories
(Firefox :: Untriaged, defect)
Tracking
()
People
(Reporter: pete, Unassigned, NeedInfo)
Details
(Keywords: regression, regressionwindow-wanted)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0
Steps to reproduce:
My web application provides two methods to view a PDF. Embed within a page and download. Everything worked fine until a very recent release when <object> stopped working for embedding.
Actual results:
When <object> stopped working, I switched to <iFrame>. But this requires the selection of "Always open in Firefox" for the PDF MIME type. That would be okay, but now my links to PDFs also open in Firefox rather than asking where to save. If I choose "Always ask" then the <iFrame> doesn't work
Expected results:
Since <object> doesn't work, what is the correct solution to display a PDF within a region on a page? Then, what settings should I use so that links ask for a download location?
This functionality works with <object> and with <iFrame> in Chromium browsers and used to work with <object> in prior versions of Firefox.
Reporter | ||
Comment 1•5 days ago
|
||
Ugh. Made an assumption here about the library I'm using to "download" the PDF. For some bizarre reason, it is making a JS Execute() call like this to send the file:
<![CDATA[window.location.replace("/$/temp/Date range 1-1-2015-12-31-2024 - Default (1) - Report layout_1112_09B2C0.pdf");]]>
So this is not actually a "download" as in a link to a static file. (although the file is available at that location)
I don't really understand the location.replace() function but it certainly looks like it could be requesting the file to be put in a window.
Before anyone pursues this, I will try to put a static link in there and see if it works.
Thanks,
Pete
Comment 2•4 days ago
|
||
Does it work if you start Firefox in Troubleshoot mode?
Can you try in a separate profile to see if it's some settings in your current profile?
https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
Do you know what's the last version of Firefox that worked? Could you try running mozregression to help to identify the issue?
https://mozilla.github.io/mozregression/quickstart.html
Updated•4 days ago
|
Updated•3 days ago
|
Updated•3 days ago
|
Description
•