Hello,
when I try to execute the php script below I get the following error message
*Fatal error*: PDFlib error: [2016] PDF_open_pdi: PDF import (PDI) not supported in this configuration in *d:\worksheet-server\wss\html\pdf\test2.php* on line *7*
I'm using Apache 1.3.31 with php 4.3.8 on Windows 2000 .
The line extension=php_pdf.dll is uncommented in php.ini
phpinfo shows
PDF Support enabled PDFlib GmbH Version 5.0.3 Revision $Revision: 1.112.2.9 $
What am I missing ?
Here is the script :
<?php
$pdf = pdf_new();
if (pdf_open_file($pdf)) { $pdi = pdf_open_pdi($pdf, 'pdf/pdftest.pdf', "", 0); $page = pdf_open_pdi_page($pdf, $pdi, 1, "");
$page = pdf_open_pdi_page($pdf, $pdi, 1, ""); $width = pdf_get_pdi_value($pdf, "width", $pdi, $page, 0); $height = pdf_get_pdi_value($pdf, "height", $pdi, $page, 0);
pdf_begin_page($pdf, $width, $height);
pdf_place_pdi_page($pdf, $page, 0.0, 0.0, 1.0, 1.0);
$font = pdf_findfont($pdf, "Courier", "host", 0); pdf_setfont($pdf, $font, 20); pdf_show_xy($pdf, "Second page", 200, 350);
pdf_close_pdi_page($pdf, $page);
pdf_end_page($pdf); pdf_close($pdf);
$data = pdf_get_buffer($pdf);
$fp = fopen ('pdftest.pdf', 'wb'); fwrite ($fp, $data); fclose ($fp); } else echo "pdf_open_file failed <br>\n";
?>
with best regards
Hendrik Schmieder
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php