I´ve stumbled over a very annoying problem with a generated PDF. I use PDFlib to dynamically generate files using info from a mySQL db. It works great and there´s no problem viewing the files with Acrobat Reader. The problem is that when the PDF is generated, a link pops up to a page where I want the generated PDF to load into the browser. I use this code:
-from the page that generates-
<a href="get_pdf.php?filename=<?echo $filename;?>">view the pdf</a>
-from get_pdf.php-
$fp = fopen($filename, "r");
header("Content-type: application/pdf");
fpassthru($fp);
fclose($fp);
I´ve let some other people try it too to eliminate a possible Acrobat error, but with the same result; Acrobat Reader starts up and loads the required dll:s and such, then it dies and crashes.
Anyone who can help me solve this delicate problem would be a God in my eyes =)
Yours Truly,
Boo