faqts : Computers : Programming : Languages : PHP : Function Libraries : PDFLib

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 31 people (29%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Sample code for populating a PDF document using Forms Data Functions (FDF)??

Apr 7th, 2002 13:59
Syn Ikal, AC Welch, Ben Udall,


Contents of PHP file:
<? $outfdf = fdf_create(); 
   fdf_set_value($outfdf, "status", "Hello World!", 0); 
   fdf_set_file($outfdf, "sample.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"); 
?>
Contents of sample.pdf
Just one dynamic textbox named status.