Force PDF Download Instead Of Opening in Browser

Posted on June 01, 2011 | Snippets

With the following snippet, you will force your browser to save and open PDF files instead of opening within the browser.
Open your .htaccess file and place the following code within it:

  ForceType application/octet-stream
  Header set Content-Disposition attachment