Isaac Bennetch on 23 Oct 2014 14:52:01 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] HTML 2 PDF converter?


On Oct 23, 2014, at 4:07 PM, JP Vossen <> wrote:

Is anyone aware of a good HTML to PDF converter tool, ideally one that
can be scripted on Linux?

Use case: automated conversion of a large HTML file created by using
a web API to dump content out of a cloud provider into an training doc,
more or less.

I'm aware of a bunch of tools, but none thrill me.  In particular, size,
making links, doing good navigation and embedding fonts (gotta love the
marketing folks :) would all be nice.

1) xhtml2pdf just works but is very slow, does not create links and
creates large PDF files (32M).  It does nice heading navigation though.

2) wkhtmltopdf just works but does not create links and creates large
PDF files (21M).  It does thumbnails but not nice heading navigation.

That would have been my first suggestion. 

3) html2ps + ps2pdf kinda worked but was really slow, creates really
ugly PDFs (but they do have links), and ps2pdf crashed even though it
did create a PDF.

4) Pandoc I can't get to work right and am out of time to fuss with it.

5) Fop I've played with (e.g., for DocBook) and as I recall it's a giant
pain, is written Java (see giant pain), and I'm not sure it takes HTML
input anyway.

6) There are various on-line, PHP, Perl & Python modules/libraries, but
it seems like there should already be a good tool written that I don't
need the cloud for.  (I know, this content is already in the cloud so
who cares?  It's the principle of the thing. :)

You might try the command line print extension for Firefox. and note that I've never used it, so if it doesn't work you aren't allowed to blame me, but it looks promising. 

Sent from my mobile device; please excuse spelling or formatting problems

JP Vossen, CISSP            |:::======|
My Account, My Opinions     |=========|
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --