Jump to content

Create an image to place inside a PDF?


amites

Recommended Posts

Hello,

 

I'm running into a trick I can't figure out,

 

is there any way to use the GD library to create an image which will then be placed onto/inside another image or PDF file?

 

The layout works like this,

 

generate a barcode, lay it on top of a default image with several blanks,

add text, provide user a downloadable PDF with the image,

 

the reason for the PDF is there can be more than one image that is output and I'd like to wrap them all into 1 file...

 

anyone out there that can point me in the right direction?

 

 

Link to comment
Share on other sites

Tried to edit this in:

 

The barcode is being generated by a class available at http://www.ashberg.de/bar

I've modified the front end to create the barcode from a database entry, but I am rather new to working with images inside PHP, and am running into trouble with creating the image and being able to use it again rather than dump it into my browser...

 

anyone out there that can point me in the right direction?

 

 

Link to comment
Share on other sites

Hello again,

 

I got past my original sticking point by altering the class to create the barcode and tied it all into a single image,

 

however I am having trouble placing an image created in PHP into a PDF, and my google-fu seems to be lacking for finding an answer to how I can get around this, referencing the PHP manual I found 3 options for placing images

 

the following essentially told me the same thing, it wants me to point it to an image file rather than an image variable...

 

//		$pdf_image = pdf_open_image_file($pdf, "png", $image, "", $pdf_page);
//(unsupported)		$pdf_image = PDF_open_memory_image($pdf, $image);
	$pdf_image = pdf_load_image($pdf,"png",$image,"");

 

anyone have an idea how I can get around this one?

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.