[publican-list] faster testing of wkhtmltopdf
Jeff Fearn
jfearn at redhat.com
Fri Nov 2 04:56:06 UTC 2012
Hi, someone was testing modifying their brand for wkhtmltopdf generation
of PDFs and asked me if there was a a faster way of doing CSS changes
and seeing how they affect the PDF.
This is how:
1: cd $book-dir
2: publican build --formats html-pdf
3: cd tmp/en-US/html-pdf
4: vim Common_Content/css/???.css
5: wkhtmltopdf --header-spacing 5 --footer-spacing 3 --margin-top 20
--margin-left 15mm --margin-right 15mm --header-html
/usr/share/publican/header.html index.html test.pdf
6: evince test.pdf
7: until happy, goto 4
8: copy the changed css file to your brands source
wkhtml2pdf supports a lot of CSS3 features, so you should be able to
play with widows and orphans as well as basic looks.
Cheers, Jeff.
--
Jeff Fearn <jfearn at redhat.com>
Senior Software Engineer
Infrastructure Engineering & Development (AEU)
Red Hat Asia Pacific Pty Ltd
GPG: 0x0357E8F0
More information about the publican-list
mailing list