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! Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.