HTML to Image |
[eluser]chandlerou[/eluser]
Is there a way to convert a rendered html page to an image (any format). I've dug around GD and ImageMagick and found nothing directly related to this.
[eluser]TheFuzzy0ne[/eluser]
I don't know if http://browsershots.org/ will help you at all? Also, I found [url="http://www.converthtmltoimage.com/"]this[/url]
[eluser]chandlerou[/eluser]
@Uberfuzz, its just a project I thought of that I'd like to take on, and I know some other services out there are similar, like browsershots but I wanted to try something different. @TheFuzzy, Those are both great tools, and I thank you for the suggestions, but I wanted something that could run on a standard webhost. I didn't know if there were any PHP extentensions or Perl Applications anyone ran accross that could accomplish this. Running this locally is not an option. Basically someone sticks a url into a form, and in return they get a screenshot/image of the url. Thats kind of what I'm going for.
[eluser]jdfwarrior[/eluser]
Does it have to be an image? Reason I ask is, I think I saw one of those html->pdf sites that had an api you could use.. I would have to look and see which one it was, but I think I remember coming across that one day.
[eluser]chandlerou[/eluser]
Well, it's final result has to be an image. I've read some resources that say imagemagick can do it, it just needs html2ps, and you can run the convert function on html. http://www.imagemagick.org/script/formats.php Scroll down and you will see HTML. Now, how would one go about installing html2ps in a cpanel environment?
[eluser]slowgary[/eluser]
There's a php function called imagegrabscreen(), but it only works on windows servers. Otherwise you're out of luck. You'd need to basically write a browser engine in PHP that renders as an image then output the image.
[eluser]jdfwarrior[/eluser]
Are you dead set on creating this functionality or would you be ok with using a free service? Only stipulation to the service is, they want you to provide a link back to their site.. http://www.artviper.net/website-thumbnails.php That works.. works well..
[eluser]jdfwarrior[/eluser]
I will say though, the only thing that sucks about that, is someone's email is going to be in plain text on the site. I would use a dummy email address or a temp address to register an account.
[eluser]TheFuzzy0ne[/eluser]
Here's another potentially useful link - http://www.thumbshots.org/. I know it says "thumbshots" but I'm sure you can do larger images. Here's another potentially useful link - http://www.acasystems.com/en/web-thumb-a...-image.htm There are also lots of paid-for products that do the same thing, but I'll keep my eye open for a free PHP soluyion for you. |
Welcome Guest, Not a member yet? Register Sign In |