common Posted January 1, 2010 Share Posted January 1, 2010 Hi all I am trying to create a pdf file by adding a img, but when I run the code I get this error message: "Fatal error: Uncaught exception 'PDFlibException' with message 'Handle parameter 'image' has bad value 0' in C:\xampp\htdocs\root\Voorbeeld\CreatePDF\pdf_file.php:24 Stack trace: #0 C:\xampp\htdocs\root\Voorbeeld\CreatePDF\pdf_file.php(24): pdf_place_image() #1 {main} thrown in C:\xampp\htdocs\root\Voorbeeld\CreatePDF\pdf_file.php on line 24" This is the code om using for the image: $pdfimage = pdf_open_image_file($mypdf, "jpeg", "img.jpeg", 'images',1); pdf_place_image($mypdf, $pdfimage, 10, 10, 0.6); I have tried pdf_open_jpeg, pdf_open_image. And all give the same result [that the image parameter has a bad value] but the image location is correct and everything. Everywhere I look on the internet I get this code and it doesn't work! Please someone help! Link to comment https://forums.phpfreaks.com/topic/186856-creting-pdf-file/ Share on other sites More sharing options...
BK87 Posted January 1, 2010 Share Posted January 1, 2010 you might need to specify a full directory path Link to comment https://forums.phpfreaks.com/topic/186856-creting-pdf-file/#findComment-986878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.