Reputation: 98
I have a type of word cloud that I developed. Its really just a simple database search result that applies random CSS styling (size, color, vertical layout, etc) to keywords to make it look pretty inside a div or single cell table. These keywords get retrieved via a PHP/mySQL function.
I would like to be able to output that DIV/table cell's (whichever would work better) contents along with the CSS styling to an image file. I've seen posts suggesting HTML2Canvas but haven't had any luck getting the search results with the CSS to show up in the image and not even sure if its possible in this case.
Any ideas to point me in the right direction?
Thanks,
Upvotes: 0
Views: 94
Reputation: 406
You could use an html to pdf script, like this one, and then use the imagick
php function to convert that to an image.
Source: http://buffernow.com/html-to-image-php-script/
Upvotes: 1