I have been using Google Chrome and recently I have re-installed my browser.
I found that whatever PDF links I open are directly downloading. However, I want them to be view on browser.
How can I do this?
Chrome is an updated version.
For Chrome to open a PDF inline, in the browser window itself, several requirements have to be met, one for the browser itself, the other for the remote server offering the PDF:
There must be a PDF viewer enabled for Chrome, either the external PDF.js one from Mozilla, or the native, builtin Chrome PDF viewer called pdfium (there are other plugins, such as the proprietary ones from Adobe Acrobat or from Foxit which can be used, but I don't discuss these in this answer):
about:plugins
into the URL bar. Search for 'Chrome PDF Viewer'. It should not be disabled.about:extensions
into the URL bar. Search for 'pdf.js'. If you find it, enable the checkmark. If you do not find it, it is not installed.Note, that you can only enable one of these two internal PDF viewers.
The remote server providing the PDF document to your browser needs to send the correct MIME type and the correct content disposition header, otherwise the browser will not open the PDF directly, but only save it (or offer to save it):
Content-Disposition: Inline
(not: Content-Disposition: Attachment
!)application/pdf
(not: application/octet-stream
!). It may be the case that it also works for text/html
but I haven't checked this.As an additional measure, please also open chrome://flags
, search for 'pdf' and see if there is a suspicious setting which may prevent the direct rendering of PDFs in the browser window.