Re: Convert HTML to PDF from CLI?
I need to convert an HTML document to PDF from the CLI. Currently, I
am using a Firefox extension to do this:
However, this has many drawbacks and I would like to remove the
dependency on Firefox. These are other solutions that I have looked
into, and their problems:
Prints the HTML, not the formatted output. It treats the whole document as text.
Does not work with UTF-8 text! My native language cannot be
represented in Latin or Japanese characters.
3) Open Office
Requires either a macro or a wrapper script, both which are
problematic and change each new OOo version (which I update often).
4) convert (from imagemagick)
Does not support UTF-8!
Slight formating problems with HTML tables. However, it is my
runner-up so far as it is the only other solution that works at all.
On http://www.unicodetools.com/#html they mention a tool called iconv.
Maybe you can convert your utf-8 encoded text to whatever html2ps can
handle with iconv?