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
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to