For some reason code fails at
pdf_place_image(...)
Here is the code:
Code: Select all
<?php
//include JavaScript debug library
include("inc/PHP_JS_debug.php");
// create handle for new PDF document
$pdf = pdf_new();
// open a file
pdf_open_file($pdf, "image_test.pdf");
// start a new page (A4)
pdf_begin_page($pdf, 595, 842);
// open and place an image
$im = pdf_open_image_file($pdf, "gif", "sig.gif");
pdf_place_image($pdf, $im, 10, 10, 1);
pdf_close_image($pdf, $im);
// end page
pdf_end_page($pdf);
// close and save file
pdf_close($pdf);
?>
What can I be doing wrong?
Thanks,
Sabina