PDF and FDF
| From: | Cesar Cordovez | Date: | Mon, 08 Sep 2003 19:24:34 +0000 |
| Subject: | PDF and FDF | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-21328@lists.php.net to get a copy of this message | ||
Hi List!
I'm using the following code to open a pdf form, place a picture and then save it. This is very new for me, and the code is giving me some errors like (Fatal error: PDFlib error: Empty document in c:\Inetpub\wwwroot\pdf_forms\dbtree.php on line 415
). Can somebody help? (line 415 is empty, line 414 is "pdf_close")
TIA.
Cesar
// Begin ------------------
$pdf = pdf_new();
pdf_open_file($pdf);
$pdi = pdf_open_pdi($pdf, $formfile, NULL, 0);
$page= pdf_open_pdi_page($pdf, $pdi, 1, "");
// write the commands to place the image here.
pdf_close_pdi_page($pdf, $page);
// pdf_end_page($pdf);
pdf_close($pdf);
// end ------------------
$formfile is "c:/Inetpub/wwwroot/pdfforms/aform.pdf"