Jump to content

[SOLVED] PDF_open_image_file - PDF add image.


teynon

Recommended Posts

I am making a system that will write to a pdf file. I can't get it to apply images. It adds text fine.

 

Error: Fatal error: Uncaught exception 'PDFlibException' with message 'Handle parameter 'image' has bad value 0' in C:\wamp\www\arms\pdf_test.php:11 Stack trace: #0 C:\wamp\www\arms\pdf_test.php(11): pdf_place_image(Resource id #2, 0, 50, 650, 1) #1 {main} thrown in C:\wamp\www\arms\pdf_test.php on line 11

 

$myimage = PDF_open_image_file($mypdf, "jpeg", $_SERVER['DOCUMENT_ROOT'] . "2062.jpg", "", 0);
PDF_place_image($mypdf, $myimage, 50, 650, 1);

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.