[Question] Is it possible to set AlwaysOpenPdfExternally
See original GitHub issueHi!
On creation of a browser or context (permanent or otherwise), is it possible to set the config value AlwaysOpenPdfExternally
or the equivalent plugins.always_open_pdf_externally
preference?
I’ve tried a kludgy solution that has me navigate to chrome://settings/content/pdfDocuments
on load and click the option. But we need to use Chromium in headless to export PDFs of pages as well as download PDF files that the browser always opens in its embedded viewer… and there seems to be no way of getting the actual PDF content out of that viewer.
Any help would be appreciated.
Cheers, Wayne
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Always Open PDF files externally - Policy - Google Help
Chrome::AlwaysOpenPdfExternally. I noticed that following setting was active, so I tried changing the key to "0" and it worked.
Read more >Open PDF Externally in IE Mode - Microsoft Community
We currently run IE Mode for a legacy application, and need PDF links to open in the native Adobe PDF application.
Read more >Set 'Always open pdfs externally' in Edge GPO, but still allow ...
Is there a way to set this, but still allow the user to change if needed? The setting now is locked and does...
Read more >Allow Microsoft Edge to download PDF files externally
This guide will show you how allow Microsoft Edge to download PDF files externally, instead of directly opening them in the browser.
Read more >How to allow or block Google Chrome from opening PDF files ...
Double-click on the Always Open PDF files externally setting. ... you need to create a REG_DWORD value named AlwaysOpenPdfExternally and set ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, after many hours of searching in the last 48 hours for a solution to this, I think I’ve managed to discover something soon after posting here that works.
Would anyone mind taking a look at this solution and seeing if it’s going to cause me any unexpected problems?
For each run:
This seems to work and forces the browser to download files vs displaying them in the in-browser PDF viewer. I just want to make sure I’m not shooting myself in the foot by only having a tiny preferences file to start (although it gets filled-in on first start).
I hit the same problem today and the way I resolved it is by adding a
download
attribute before clicking the pdf link. Example: