From the Knowledgebase

Download button opens PDF in a new tab

You may find that when you click on the 'download' button within the PDF viewer, the PDF opens in a new tab instead of downloading.

This behavior normally happens in Chrome, and you might consider it annoying - when you download a file you want it to be downloaded to your hard drive, and then you can choose to view it from there!

It is possible to change the default behavior on Chrome so that this doesn't happen when you download PDFs. It is also possible to convince most browsers to download the file directly, so this will help all your users (not just you).

To disable this behavior just for your own Chrome installation, type chrome://plugins in the URL bar and then click the 'Disable' link underneath 'PDF Viewer'.

To force downloads of all PDFs on your WordPress site, the configuration may depend on your server so please ask your web hosting company for help. As a guideline, on Apache you could try adding the following text to the .htaccess file in your site's root folder (e.g. via FTP).

<FilesMatch "\.(?i:pdf)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>

Details for why this works can be found in this article.

Top