On Wed, Nov 06, 2002 at 02:26:22PM +0000, Paul Makepeace ([EMAIL PROTECTED]) 
wrote:
> What are the options for HTML to PDF conversion, preferably batchable?
> By HTML I mean that which is understood by modern browsers, namely up to
> XHTML 1.0 + CSS(at least)1.0, rather than HTML 3.2 or something outdated
> like that. Just to be even more tricky, the HTML isn't being generated
> *from* anything like LaTeX so can't be eliminated as a step.
> 
> As far as I know, there isn't an open source answer - the best I've seen
> is OS X's ability to save as PDF. What else is there? Can it be
> automated? This question may boil down to "does anyone know Distiller?".
> 
> Adobe provide some handy services to do the conversion the other way,
> http://www.adobe.com/products/acrobat/access_onlinetools.html

[Dave enters this thread a little late]

Strikes me that there should be some way to use Gecko to do it. That
would certainly get round the problem of it understanding "modern"
HTML.

Most Gecko-based browsers will save a page as postscript (using "print
to file" and choosing a basic postscript printer). So the problem
becomes how to script that action.

Netscape 4.x used to allow you to do this using the "remote" interface:

netscape -noraise -remote("openFile($url))
netscape -noraise -remote("saveAS($file, 'PostScript'))

but that interface doesn't seeme to be available in Netscape 7, Mozilla
or Galeon.

Seems an obvious use of Gecko to me, but no-one seems to have done it
yet. In the absense of that, perhaps an Expect-based solution round
Mozilla would be the best idea.

Dave...

-- 
  Drugs are just bad m'kay

Reply via email to