If you link directly to the actual PDF file, there's nothing PHP can do about it. However, it is possible to link to a PHP script that would then read and output the PDF file, including headers that would force a download. At it's most basic, it might be something like:
<?php
$dir = 'directory/where/PDF/files/are/';
$file = basename($_GET['file']);
if(is_readable($dir.$file))
{
header('Content-Length: ' . filesize($dir.$file);
header('Content-Type: application/PDF');
header('Content-Disposition: attachment; filename="'.$file.'"');
header('Content-Transfer-Encoding: binary');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
readfile($dir.$file);
}
else
{
header('HTTP/1.0 404 Not Found');
}
You would then link to that file with the filename in the URL query string, e.g.:
http://www.yoursite.com/get_pdf_file.php?file=filename.pdf