Below is the code to send a *.fdf (Adobe Forms) file to a PDF. On my Win2kAS server (PHP 4.3.2) if I name this code pdf_pop.php instead of sending outtest.fdf to Adobe it sends pdf_pop.php.fdf, which is not a valid file.
Is this a fopen issue? anyone have a clue as to what is causing this?
Ned
<?php
$outfdf = fdf_create();
fdf_set_value($outfdf, "name", "Fred",0);
fdf_set_file($outfdf, "http://domain/pdf/pdf.pdf");
fdf_save($outfdf, "outtest.fdf");
fdf_close($outfdf);
Header("Content-type: application/vnd.fdf");
$fp = fopen("outtest.fdf", "r");
fpassthru($fp);
unlink("outtest.fdf");
?>