extension ExtPose

PDF Forcedownload Blocker

CRX id

ojbkmmcompidaghfnodmbeiankbbfckl-

Description from extension meta

This extension prevents webservers from forcing pdfs to download rather than open in browser

Image from store PDF Forcedownload Blocker
Description from store Many websites will attempt to force you to download linked PDF files, rather than handle them as per your preferences. (By default, your preferences are set to open them in-browser with Chrome's PDF plugin). This extension blocks two common ways of forcing your browser to download PDF files, allowing you to handle them consistently and as you choose. WARNING, USE AT OWN RISK: Some websites load pdfs into invisible elements for download, causing them not to be seen at all when this extension is enabled. Unfortunately I can't find a good solution for this :( Most commonly where this is encountered (eg on google docs), the pdf is linked with a name not corresponding to it's filename. To this end the extension now ignores links that don't have ".pdf" in them. I wrote this app for myself and my friends at uni, to combat university pdfs being linked with forced download. I don't really know much Javascript/HTTP, so no guarantees :)

Latest reviews

  • (2022-09-14) Forever Thatter: It sucks.
  • (2022-03-30) Christoph Thiede: This sounds very promising, but it doesn't seem to work for GitHub releases such as this one: https://github.com/LinqLover/sonyx/releases/download/v0.2/sonyx-study-final.pdf
  • (2022-03-07) Luc Y.: Works as described! For those who say it doesn't: Make sure your default browser behaviour is also set to open PDFs instead of downloading them as this blocker only sets forcedownload=0. (For Chrome: Settings > Security and privacy > Site settings > Additional content settings > PDF documents)
  • (2021-12-07) Jay Bingham: It did not work for me on the web page where I tried it; the link still forces a download. The URL that I clicked does not contain PDF in it instead it has this string at the end: AttachmentViewer.ashx?AttachmentID=57723&ItemID=35671, which may mean that the extension will not detect that a PDF is is being forced to download, I don't know. I do know that if it does not work or only works in limited cases it is of little use to me.
  • (2021-05-23) Yue Shi: 挺好用的
  • (2020-11-26) sc: It worked for me only if I open the links in a new tab. I solved this with a shortcut (clicking the links with middle touchpad button for opening new tabs).
  • (2020-02-21) Tim Soriano: Yep, works great. Thanks alot edit: OK. changed to 3 stars. doesn't work on all sites
  • (2019-10-14) Michael Stephenson: Works with some troubles. Works.pdf + Works space.pdf + Хрен.pdf - Хрен пробел.pdf - Also not works if pdf links dont have any actual "pdf" word in the links or text in differnt language then EN like https://confluence.site.msk.ru/download/attachments/126388176/NOTICE2222222%20-%20%D0%BA%D0%BE%D0%BF%D0%B8%D1%8F.pdf?version=1&modificationDate=1571062443387&api=v2
  • (2019-09-07) Darren Skidmore: Worked for some PDFs, but did not work for others. I don't think this extension actually overrides the "content-disposition: attachment" header.
  • (2019-09-05) Tiro: Doesn't work at all.
  • (2019-08-21) Olivier Collet: Unfortunately it does not work for me
  • (2019-08-20) Clay Bratt: Worked as intended, aka clicked a link, to a pdf on Smartsheet, in Outlook and opened instead of downloading, finally.
  • (2019-08-05) Brandon Fowler: It works! Thank you!
  • (2019-05-22) Preston Thomas: Sadly doesn't work on the website I needed it to (fcc.gov/). I would love this to actually work. It's crazy it's not built in functionality.
  • (2019-03-03) S HD: I have never wrote a review of any app or a extension in my life but this one is just amazing!! now I can skim my university's PDFs easily without downloading numerous files and delete them!
  • (2018-12-15) Hyanne Park: After many years of PDFs downloading to my computer and wasting memory space, I was finally able to open a PDF file in Chrome WITHOUT having to download!!! OMG!! THANK YOU SO MUCH!! THIS WORKS!!
  • (2018-11-30) clarence112: Just didn't work.
  • (2018-08-27) Nick Shorter: Did not operate as intended
  • (2018-05-08) Pim van der Loos: Only worked on 1 site
  • (2018-04-04) Ivan: Works fine, but it would be better if it can be opened in a new tab
  • (2018-03-26) Nisarg Shah: Doesn't work.
  • (2018-03-18) Paul Slocum: Doesn't seem to change anything, PDFs still download without any other option
  • (2017-07-04) Yoav Dim: Now I no longer need to copy paste the links just to edit the url "forceddownload=1" great!
  • (2017-06-21) didn't work for me
  • (2016-03-17) Keith P.: Doesn't appear to work on pdf documents served from http://www.te.com/ Example: http://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=1909782&DocType=Customer+Drawing&DocLang=English
  • (2016-02-07) Tristan Brown: Did not block PDFs from auto-downloading.
  • (2015-03-28) Gary Spencer: FINALLY ONE THAT WORKS :D
  • (2013-12-14) Group Coordinator: Well I was getting an error message when I tried to open certain links to pdf files - a separate window would open then I got an Acrobat error message. as soon as i installed this extension, the same window opened but now I have a fully functional Acrobat pdf viewer within Chrome.
  • (2013-07-04) Toby Adams: Looking forward to an update, as this simply does not work as advertised. PDFs still download and do not open as advertised.
  • (2013-04-09) Alain Coetmeur: I thought it was not working with gmail, because download still download. but "view" works well. seems to work for others sites as expected. thanks

Latest issues

  • (2020-04-06, v:0.3) Karen Smith: I wanted this to work -- but it didn't
    Our government website only opens PDFs in Edge. All other browsers are forced to download these documents (I hate desktop clutter): https://pubsaskdev.blob.core.windows.net/pubsask-prod/.
  • (2019-11-06, v:0.3) Gio -: Great extension
    Hi, I find your extension very useful, but I need to tweak it in order to correctly work with pdfs found in my intranet. Can I just take your code, give credit for it and link at your page, but also modify it and republish it on Chrome store with my additions? Thanks in advance
  • (2017-06-09, v:0.3) Graham Jones: No longer works
    Simply doesn't work any more.
  • (2015-02-20, v:0.3) Daniel San: Security issues
    The extension works great, thank you so much for creating it! However version 0.3 has a couple of security problems: 1. It removes the content-type altogether instead of setting it to "application/pdf". If the file is actually HTML, the browser would run its content in the context of the site (e.g. Google Drive -> someone could get your Google login cookie). 2. It checks if the filename contains ".pdf" instead of checking if it ends in ".pdf". Someone can name a file evil.pdf.html and for the result see point 1. Here is a safer version (it only acts if the content-type is pdf, octet-stream, x-forcedownload or missing AND the file name ends with .pdf; it always sets the content-type to pdf): chrome.webRequest.onHeadersReceived.addListener(function (details) { try { var hasType = false; var typeIsDownload = false; var typeIsPdf = false; var typeIsBinary = false; var filenameIsPdf = false; for (var i = 0; i < details.responseHeaders.length; i++) { if (details.responseHeaders[i].name.toLowerCase() == 'content-type') { hasType = true; } if (details.responseHeaders[i].name.toLowerCase() == 'content-type' && details.responseHeaders[i].value.toLowerCase() == 'application/x-forcedownload') { typeIsDownload = true; } if (details.responseHeaders[i].name.toLowerCase() == 'content-type' && details.responseHeaders[i].value.toLowerCase() == 'application/pdf') { typeIsPdf = true; } if (details.responseHeaders[i].name.toLowerCase() == 'content-type' && details.responseHeaders[i].value.toLowerCase() == 'application/octet-stream') { typeIsBinary = true; } if (details.responseHeaders[i].name.toLowerCase() == 'content-disposition' && details.responseHeaders[i].value.match(/.* filename=".*\.pdf"$/i)) { filenameIsPdf = true; } } for (var i = 0; i < details.responseHeaders.length; i++) { if (details.responseHeaders[i].name.toLowerCase() == 'content-type' && details.responseHeaders[i].value.toLowerCase() == 'application/x-forcedownload' && filenameIsPdf) { details.responseHeaders[i].value = 'application/pdf'; } if (details.responseHeaders[i].name.toLowerCase() == 'content-type' && details.responseHeaders[i].value.toLowerCase() == 'application/octet-stream' && filenameIsPdf) { details.responseHeaders[i].value = 'application/pdf'; } if (details.responseHeaders[i].name.toLowerCase() == 'content-disposition' && details.responseHeaders[i].value.match(/.* filename=".*\.pdf"$/i) && (typeIsDownload || typeIsPdf || typeIsBinary || !hasType)) { details.responseHeaders[i].value = details.responseHeaders[i].value.replace(/^attachment/i, 'inline'); if (!hasType) { details.responseHeaders[details.responseHeaders.length] = { name: "Content-Type", value: "application/pdf" }; } } } } catch (err) {} return {responseHeaders:details.responseHeaders}; }, {urls: ['*://*/*.pdf*']}, ['blocking', 'responseHeaders']);
  • (2013-12-03, v:0.3) Dan Root: Freshbooks PDF View
    Hello! I was so excited when I saw this plugin... Unfortunately, I notice that "PDF" Freshbooks invoices are still downloading rather than opening. Not sure if they use the same technique as Google Docs which there is no way to force, but would you mind looking into it? I have an AWESOME printer that I can only print to via my Mac on Chrome Cloud Printer and when PDFs download (rather than open in the browser) I am forced to manually re-open them again just to print them. Any help is appreciated! Thanks.
  • (2013-04-01, v:0.2) George Solomos: Export to PDF from Google Docs
    Hi Brenton, Unfortunately this extension causes exporting to PDF from Docs to break. Could you please look into this and maybe add a simple settings dialog to add domains as exceptions? Thanks, George.

Statistics

Installs
2,499 history
Category
Rating
3.125 (40 votes)
Last update / version
2013-08-11 / 0.3
Listing languages
en

Links