Recent answers to PDFs are opening in browser AND downloadinghttps://support.mozilla.org/en-US/questions/13872282022-08-25T01:49:52-07:00If you don't want the PDF in your Temp folder, either, Firefox 103 added a new option to store it in2022-08-25T01:49:52-07:00jscher2000https://support.mozilla.org/en-US/questions/1387228#answer-1529304<p>If you don't want the PDF in your Temp folder, either, Firefox 103 added a new option to store it in the browser cache.
</p><p><strong>(3) New Content-Disposition Override</strong>
</p><p>When a server sends a PDF, it can optionally send a <strong>Content-Disposition</strong> header (<a href="https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition" rel="nofollow">MDN</a>). This header can indicate either "inline" or "attachment".
</p>
<ul><li> "inline" refers to displaying in the browser
</li><li> "attachment" refers to downloading
</li></ul>
<p>This is invisible to you but explains why some PDFs open normally with their web address (inline) and some save to disk and open in a new tab with a file:/// address (attachment) after being saved to disk.
</p><p>GOOD NEWS: Firefox 103 now has a new feature to override Content-Disposition: attachment for PDFs, making Firefox treat them all as web content (inline). If you prefer to use Firefox as your PDF viewer, then this should be helpful:
</p><p>(a) In a new tab, type or paste <strong>about:config</strong> in the address bar and press Enter/Return. Click the button accepting the risk.
</p><p><em>More info on about:config:</em> <a href="/en-US/kb/about-config-editor-firefox" rel="nofollow">Configuration Editor for Firefox</a>. <em>The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. I'm using this so I feel comfortable mentioning it.</em>
</p><p>(b) In the search box in the page, type or paste <strong>browser.download.open_pdf_attachments_inline</strong> and pause while the list is filtered
</p><p>(c) Double-click the preference to switch the value from false to true
</p><p>Success?
</p>Firefox 98 made a lot of changes to how PDFs open. The two big ones are:
(1) Skipping the download d2022-08-25T01:45:25-07:00jscher2000https://support.mozilla.org/en-US/questions/1387228#answer-1529297<p>Firefox 98 made a lot of changes to how PDFs open. The two big ones are:
</p><p><strong>(1) Skipping the download dialog</strong>
</p><p>Firefox 97 and earlier would present a download dialog if the server tried to bypass the viewer by forcing a download (Content-Disposition: attachment). If you have "Open in Firefox", Firefox now skips the dialog and behaves as though you had clicked "Open with Firefox" in that dialog. In other words, it saves the file to disk and then opens it.
</p><p><strong>(2) Saving files in the "Save files to" folder instead of your Windows Temp folder</strong>
</p><p>Firefox 98 changed from saving downloads in the Windows Temp folder for "Open with [relevant application]" or "Use [relevant application]" to saving them in your default downloads folder (the one next to "Save files to" on the Settings page). It's not possible to pass a file to an application without saving it somewhere.
</p><p>Firefox 102 added a hidden setting to roll back that change. Here's how you access it:
</p><p>(a) In a new tab, type or paste <strong>about:config</strong> in the address bar and press Enter/Return. Click the button accepting the risk.
</p><p><em>More info on about:config:</em> <a href="/en-US/kb/about-config-editor-firefox" rel="nofollow">Configuration Editor for Firefox</a>. <em>The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.</em>
</p><p>(b) In the search box in the page, type or paste <strong>browser.download.start_downloads_in_tmp_dir</strong> and pause while the list is filtered
</p><p>(c) Double-click the preference to switch the value from false to true
</p>PDF files need to be downloaded for Firefox to be able to read them for the PDF viewer.
2022-08-25T01:37:13-07:00user104147805413306348376805769878442569366https://support.mozilla.org/en-US/questions/1387228#answer-1529289<p>PDF files need to be downloaded for Firefox to be able to read them for the PDF viewer.
</p>