PDF Embedder Documentation

Documentation, Reference Materials, and Tutorials for PDF Embedder

Get access to
Powerful Features!

Home » Documentation » Troubleshooting Errors » Download button opens PDF in a new tab

Download button opens PDF in a new tab

This is a browser behaviour, not a plugin bug. Most modern browsers, Chrome in particular, are set to open PDFs in their built-in viewer rather than save them to disk.

This guide explains what is happening and what options are available.


Why the Issue Happens

Browsers like Chrome and Firefox have a built-in PDF viewer that intercepts PDF file requests. When a user clicks the viewer’s download button, the browser can open the file in its own viewer rather than triggering a save dialog. This is controlled at the browser level, not by WordPress or PDF Embedder. And

How to Resolve

Change the PDF handling setting in your browser

If you are testing this on your own machine and want to change how your browser handles PDFs, the steps differ by browser.

In most versions of Chrome, go to Settings > Privacy and Security > Site Settings > Additional content settings > PDF documents and enable Download PDFs.

This only affects your own browser and does not change the behaviour for visitors to your site.

Force PDF downloads for all visitors via server configuration

The other option is to make PDFs download rather than open in a tab for all site visitors, and configure the server to send a Content-Disposition: attachment header with every PDF response.

The configuration method depends on your server type. Ask your hosting provider if you are not sure which server your site runs on.

For Apache servers, you could add the following to the .htaccess file in your site’s root folder (accessible via FTP or your host’s file manager):

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

This tells the server to send all PDF files as generic binary downloads, which forces the browser to save them rather than open them inline.

Frequently Asked Questions

Below are some common questions about PDF download behaviour.

The .htaccess change did not work. What else can I try?

Some hosts run Nginx or other servers that do not use .htaccess. The equivalent configuration needs to be applied at the server or virtual host level. Contact your hosting provider and ask them to set Content-Disposition: attachment for PDF files.

Still have questions? We’re here to help!

Last Modified: