I have worked on finding the best method of displaying a pdf file that is kept in a directory above the public_html. It allows a person to protect the files from external links, while reducing the need to put the data into a mysql database.
This code was developed with help from many people, especially the guys over at the Joint Support Forum
<?php
$filename="letter.pdf";
$filepath="../articles/letter.pdf";
$filesize=filesize($filepath);
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/pdf");
header("Content-Length: $filesize");
header("Content-Disposition: inline; filename=$filename");
header("Content-Transfer-Encoding: binary");
$fp = fopen($filepath, 'rb');
$pdf_buffer = fread($fp, $filesize);
fpassthru($fp);
fclose ($fp);
print $pdf_buffer;
exit();
?>