Jump to content

Creting Pdf File


common

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.