HTML rendering service or API

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

HTML rendering service or API

Post by alex.barylski »

I have seen these around before...either as a web service or other...

Ideally I'd like a PHP extension which accepted HTML file and rendered the result as an PNG.

Anyone know of anything?

Cheers,
Alex
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: HTML rendering service or API

Post by onion2k »

By far the easiest way is to use something like http://www.shrinktheweb.com/ ... it's possible to do it with scripting (eg COM on Windows, shell on Linux) but it's incredibly fragile. How you actually achieve it really depends on your server platform.

If you're on Windows try http://uk2.php.net/manual/en/function.i ... window.php ... maybe you'll have more luck with it than I have. I've never got it to work.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: HTML rendering service or API

Post by panic! »

http://khtml2png.sourceforge.net/

requires you have a gui running on the server though.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: HTML rendering service or API

Post by panic! »

or at least available.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: HTML rendering service or API

Post by alex.barylski »

onion: Why weren't you able to get it to work on Windows?

If my server was a Windows machine I could probably figure it out, unfortunately my server is a Linux Debian...

I managed to dig up some additional resources:

http://www.boutell.com/webthumb/
http://khtml2png.sourceforge.net/
http://ipinfo.info/html/rendering_services.php

Hopefully one of these will suffice. :)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: HTML rendering service or API

Post by onion2k »

PCSpectra wrote:onion: Why weren't you able to get it to work on Windows?
No idea. It just returned a blank image handle. I didn't try very hard..
Post Reply