amites Posted December 4, 2007 Share Posted December 4, 2007 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? Quote Link to comment Share on other sites More sharing options...
amites Posted December 4, 2007 Author Share Posted December 4, 2007 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? Quote Link to comment Share on other sites More sharing options...
tippy_102 Posted December 4, 2007 Share Posted December 4, 2007 Instead of displaying the image in your browser, save it to disk, use it in your pfd file, then delete the image (or not). If you post code, we can help. Quote Link to comment Share on other sites More sharing options...
amites Posted December 6, 2007 Author Share Posted December 6, 2007 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? 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.