File:  [LON-CAPA] / modules / damieng / wkhtmltopdf_test / readme.txt
Revision 1.1: download - view: text, annotated - select for diffs
Thu Jan 26 17:46:45 2017 UTC (7 years, 9 months ago) by damieng
Branches: MAIN
CVS tags: HEAD
added wkhtmltopdf_test to print to PDF from HTML documents

wkhtmltopdf (based on Webkit) can be used to create PDF files from HTML automatically. This works really well, and could eventually replace LaTeX for LON-CAPA printing, which would add support for modern HTML with CSS. The main issue is that it does not support CSS for multi-columns. This code solves this problem by using Javascript on the fly when creating the PDF. The Javascript automatically creates tables to simulate columns. Eventually Webkit might support CSS columns and this Javascript will no longer be needed.
wkhtmltopdf should be downloaded from http://wkhtmltopdf.org/downloads.html , and the path to the executable should be updated in run_wkhtmltopdf. run_wkhtmltopdf.sh simply creates test.pdf from test.html.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>