Asperon Posted July 31, 2007 Share Posted July 31, 2007 can the contents of a <div> tag be converted to an image using php? Quote Link to comment https://forums.phpfreaks.com/topic/62740-solved-converting-a-tag-to-an-image/ Share on other sites More sharing options...
AndyB Posted July 31, 2007 Share Posted July 31, 2007 Only with a stupendous amount of code effort using the GD library. I can't think of a good reason for wanting to do it .... but then, I don't need to code it. Quote Link to comment https://forums.phpfreaks.com/topic/62740-solved-converting-a-tag-to-an-image/#findComment-312289 Share on other sites More sharing options...
Asperon Posted July 31, 2007 Author Share Posted July 31, 2007 what would be a good way to do the following ( I will use a business card example) be able to select backgrounds, then add text in designated areas and print as an image would you have hte backgrounds as images and then use php to write ontop of the image? Quote Link to comment https://forums.phpfreaks.com/topic/62740-solved-converting-a-tag-to-an-image/#findComment-312298 Share on other sites More sharing options...
AndyB Posted July 31, 2007 Share Posted July 31, 2007 All you've described is available with the GD library functions (available with any decent hosting package) http://ca.php.net/gd Quote Link to comment https://forums.phpfreaks.com/topic/62740-solved-converting-a-tag-to-an-image/#findComment-312304 Share on other sites More sharing options...
Psycho Posted July 31, 2007 Share Posted July 31, 2007 I would utilize a select list to select the background image and then have several text fields for the individual elements of text: name, address, phone, etc. then you can more easily create an image using the GD Library. But, trying to dynamically determine what is in a DIV and where would be difficult. Quote Link to comment https://forums.phpfreaks.com/topic/62740-solved-converting-a-tag-to-an-image/#findComment-312310 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.