Converting HTML to PDF non-interactively with konqueror or mozilla
Tom Eastman
tom.eastman at stonebow.otago.ac.nz
Wed Feb 7 21:37:51 UTC 2007
Hey guys,
Here's an interesting puzzle I'm trying to work out, and I was hoping
someone else might have some insight into.
I need to convert HTML files to PDF files, in large numbers, on a
regular basis. There are two tricky points here:
1. I need the process to be non-interactive, something that I can
further automate with shell-scripts or Makefiles or something.
2. I need the HTML files to be correctly rendered. Unfortunately, the
'html2ps' program doesn't interpret the pages well enough, I think it's
ignoring some of the stylesheets or something. Otherwise it would be
ideal for my task.
Both konqueror (khtml) and mozilla (gecko) can be used to create the
PDFs just like how I want them to appear, but both of them require
manual, interactive steps (load page, select print, 'print to ps/pdf' or
some such).
So the question is, how can I script interactivity with either of these
two programs?
Any ideas will be much appreciated!
Cheers,
Tom
More information about the ubuntu-users
mailing list