hello,
I use this code. But got a proble is shown below:
Fatal error: Uncaught exception 'PDFlibException' with message 'pdf_open_image_file() expects exactly 5 parameters, 4 given' in D:\xampplite\htdocs\Resturant_project\user\image_test.php:7 Stack trace: #0 D:\xampplite\htdocs\Resturant_project\user\image_test.php(7): pdf_open_image_file(Resource id #2, 'jpeg', 'images_017.jpg', '') #1 {main} thrown in D:\xampplite\htdocs\Resturant_project\user\image_test.php on line 7
and code is shown here:
<?php
$mypdf = PDF_new();
PDF_open_file($mypdf, "");
PDF_begin_page($mypdf, 595, 842);
$myfont = PDF_findfont($mypdf, "Times-Roman", "host", 0);
PDF_setfont($mypdf, $myfont, 12);
$myimage = pdf_open_image_file($mypdf, "jpeg", "images_017.jpg","");
pdf_place_image($mypdf, $myimage, 30, 750, 0.6);
// RGB colors: 1 = 100 % (255)
PDF_setcolor($mypdf, "stroke", "rgb", 1, 0, 0);
PDF_moveto($mypdf, 20, 735);
PDF_lineto($mypdf, 575, 735);
PDF_stroke($mypdf);
PDF_moveto($mypdf, 20, 55);
PDF_lineto($mypdf, 575, 55);
PDF_stroke($mypdf);
PDF_show_xy($mypdf, "A sample document.", 50, 40);
PDF_end_page($mypdf);
PDF_close($mypdf);
$mybuf = PDF_get_buffer($mypdf);
$mylen = strlen($mybuf);
header("Content-type: application/pdf");
header("Content-Length: $mylen");
header("Content-Disposition: inline; filename=gen03.pdf");
print $mybuf;
PDF_delete($mypdf);
?>
Please anyone can help me how I can sole this problem...