Re: [Boston.pm] HTML Renderer
You might also want to lookin into Image::Magick. It does some pretty impressive things and I could have sworn I read somehwere that it could do just that. I have used Image:Magick before and it's very fun and easy. I would definitely suggest looking into it. I will too if I get some time later. --Alex I'm looking for a server-based object that will do a virtual screen capture of a web page and save the result as a jpg. Sort of like http://bettersearch.g-blog.net/ ideally, it would take a url as an argument, and return a jpg. Is there such a beast? ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] HTML Renderer
On Tue, Mar 08, 2005 at 12:06:26PM -0600, Alex Brelsfoard wrote: You might also want to lookin into Image::Magick. It does some pretty impressive things and I could have sworn I read somehwere that it could do just that. I have used Image:Magick before and it's very fun and easy. I would definitely suggest looking into it. I will too if I get some time later. Ah yes, a clue! It turns out that there is an html to postscript converter http://user.it.uu.se/~jan/html2ps.html and, of course, ImageMagick can convert from postscript to other image formats... -Gyepi ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] HTML Renderer
I saw a reference to khtml2png on a board somewhere. I know nothing about it though. Is html to pdf, then pdf to image too much? I'm sure that would be easier (though subject to more interpretations of the original page). -John ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] HTML Renderer
On Tue, Mar 08, 2005 at 02:02:47PM -0500, Chris Devers wrote: On Tue, 8 Mar 2005, Gyepi SAM wrote: On Tue, Mar 08, 2005 at 12:06:26PM -0600, Alex Brelsfoard wrote: You might also want to lookin into Image::Magick. Ah yes, a clue! It turns out that there is an html to postscript converter http://user.it.uu.se/~jan/html2ps.html Is it aware of CSS and Javascript? The documentation -- http://user.it.uu.se/~jan/html2psug.html I don't know. I only glanced briefly at the documentation. -- implies that it's aware of CSS (in fact, the config file syntax looks like it's just CSS), but I see no mention of Javascript, which can be at least as important in controlling what ends up on a page. It may be attacking a small nut with an enormous hammer, but wouldn't the best approach to this be some kind of scriptable wrapper around the Gecko or KHTML rendering engine? That way you're starting out with the way the represented in a standard client side browser's engine. You raise good points, and I think that would be the most general approach if the intent is to convert arbitrary web pages to images. However I don't know what the original poster had in mind. Similarly -- and this way lies madness, I admit up front -- just run the script on a system that can use AppleScript or COM (or WSH or whatever it is, I'm not a Windows programmer) to just automate interacting with a regular browser like Firefox or Safari, and save the result that way. If you run it on OSX, you can go straight from this to a PDF file for free. That would work too. The simplest solution though, may be to simply feed a url to the browser and ask it to print the page as a postscript file, which would then be handed off to ImageMagick. Mozilla and Firefox (at least on Unix) have the (mozilla|firefox)-remote program but it appears that the 'saveAs(postscript)' command is not implemented, according to this file. http://lxr.mozilla.org/seamonkey/source/xpfe/components/xremote/src/XRemoteService.cpp -Gyepi ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] HTML Renderer
On Tue, 8 Mar 2005 14:02:47 -0500 (EST), Chris Devers [EMAIL PROTECTED] wrote: [...] Similarly -- and this way lies madness, I admit up front -- just run the script on a system that can use AppleScript or COM (or WSH or whatever it is, I'm not a Windows programmer) to just automate interacting with a regular browser like Firefox or Safari, and save the result that way. If you run it on OSX, you can go straight from this to a PDF file for free. I've done this on Windows for web pages that were IE only. It was a small PITA to get running (you have to install a driver to print to PDF files and there were some magic parameters that had to be set by hand in IE so that it would print to a file), but not that hard. What was hard was that it was unreliable, and every so often needed to be kicked. Which was OK since it was a batch process that produced a bunch of them that were stored as files. (I would NOT do this for an interactive web page!) I was very happy when those web pages got cleaned up so that we could switch to html2pdf instead. Cheers, Ben ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
[Boston.pm] HTML Renderer
I'm looking for a server-based object that will do a virtual screen capture of a web page and save the result as a jpg. Sort of like http://bettersearch.g-blog.net/ ideally, it would take a url as an argument, and return a jpg. Is there such a beast? ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm