Programmatically Create Image From Web-page Or A Single Div
Solution 1:
You cannot create image from div for sure but yes you can create dynamic images in php using its gd library. Following links will help:
http://php.net/manual/en/function.imagecreate.php
http://phptutorial.info/learn/create_images/
Solution 2:
Here is a great way for you to create images on the client side: http://smus.com/screen-capture-for-chrome-os
You can take this and create a web app that will work nicely on webkit (for other browsers - I'll look at JS polyfills).
Solution 3:
Did anyone mention html2canvas and/or jsfeedback ?
It create a page screenshot completely in javascript, then you can send to the server via ajax..
Obviously, CSS support lack some things.
Solution 4:
In php, there is many image related functions like imagettftext() in GD library for details, check this out http://php.net/manual/en/book.image.php if GD is not enough, you can try imagick as well
for the template, you can try creating a true color handle in php from your file(image) and add the text part or something else with all kinds of effects and bar codes etc.
but in your case, i would suggest dynamic PDF creation since it would better with formatting instead of plain image, the pdf lib : http://www.fpdf.org/
Solution 5:
you could easily have a background image of your token/voucher and overlay the text using some php variables.
i believe it is possible to create a unique bar-code with php imaging too.
Post a Comment for "Programmatically Create Image From Web-page Or A Single Div"