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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.