I have a requirement to put up some content (a large number of reports) in a website (as webpages) as well as PDF documents. The web pages will be fairly simple, as they are converted from Markdown or AsciiDoc.
I would like to style these pages using HTML5 and CSS3, and define print output with CSS3 paged media. The problem I am having is I'm unable to find a good rendering tool to convert HTML5+CSS3 paged media to PDF.
What I found so far:
- I checked wkhtmltopdf, but it appears that it has a problem with
@page
and@media print {}
. - O'Reilly's HTMLBook looked promising, but looks like their tools are internal.
- Prince apparently does the job, but it is very expensive. I need a free tool.
Can anyone suggest a tool that,
- renders HTML5+CSS paged media into PDF
- is free (to be used in my own project, which will be free and open source)
- conforms to HTML5 and CSS3 standards as much as possible?