This PR adds wkhtmltopdf as an alternative PDF rendering engine to PrinceXML.
Motivation: PrinceXML is a really fine utility but, being a commercial product (and not a cheap one), it falls out of reach of most modest developers. Using wkhtmltopdf as an alternative in easybook has been suggested several times.
Limitations: wkhtmltopdf does a very good job in PDF rendering but its capabilities fall behind when compared to PrinceXML. But this comparison is not totally fair, because wkthmltopdf is extensively used by a lots of projects and individuals who are very happy with it. Is only when compared to a commercial product like PrinceXML that it begins to show its weaknesses. Do not forget that it is Open Source (LGPL license) and free to use.
Among others, the main limitations of this implementation are:
LOF (list of tables) and LOT (list of figures) content types cannot be used and will be ignored if present, because the current implementation of wkhtmltopdf does not provide any way to render them with page numbers.
margin takes only milimiters (i.e. 10mm).
two_sided is not supported and will be ignored if present. The book will be rendered with only one-sided pages.
page_size only takes certain values listed in its documentation.
PDF documents generated by current version of wkhtmltopdf cannot be processed by easybook to add the PDF cover (this may be fixed in the future). A standard HTML cover will be used instead.
Headers and footers cannot be styled (and HTML headers and footers cannot be used because of rendering errors).
TOC rendering is somewhat limited, and outline items cannot be filtered.
And, of course, all of the highly sofisticated PrinceXML extensions are missing.
The best way to learn about the limitations/differences with PrinceXML is generating the print and print-wkhtmltopdfeditions of the documentation and comparing them.
Fixes #25 .
This PR adds wkhtmltopdf as an alternative PDF rendering engine to PrinceXML.
Motivation:
PrinceXML
is a really fine utility but, being a commercial product (and not a cheap one), it falls out of reach of most modest developers. Usingwkhtmltopdf
as an alternative ineasybook
has been suggested several times.Limitations:
wkhtmltopdf
does a very good job in PDF rendering but its capabilities fall behind when compared toPrinceXML
. But this comparison is not totally fair, becausewkthmltopdf
is extensively used by a lots of projects and individuals who are very happy with it. Is only when compared to a commercial product likePrinceXML
that it begins to show its weaknesses. Do not forget that it is Open Source (LGPL license) and free to use.Among others, the main limitations of this implementation are:
LOF
(list of tables) andLOT
(list of figures) content types cannot be used and will be ignored if present, because the current implementation ofwkhtmltopdf
does not provide any way to render them with page numbers.margin
takes only milimiters (i.e. 10mm).two_sided
is not supported and will be ignored if present. The book will be rendered with only one-sided pages.page_size
only takes certain values listed in its documentation.wkhtmltopdf
cannot be processed by easybook to add the PDF cover (this may be fixed in the future). A standard HTML cover will be used instead.PrinceXML
extensions are missing.The best way to learn about the limitations/differences with
PrinceXML
is generating theprint
andprint-wkhtmltopdf
editions of the documentation and comparing them.