Monday, November 14, 2011

WeasyPrint

WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. WeasyPrint is free software released under the AGPL license.
It is based on libraries for parsing, text and drawing but not on full rendering engines like WebKit on Gecko. The CSS visual rendering is written in Python and meant to be easy to hack on.
Get started by installing it or jump to:

Sample output

As an example, here is the introduction chapter of the CSS 2.1 spec rendered with WeasyPrint: CSS21-intro.pdf. It was obtained by running:
weasyprint http://www.w3.org/TR/CSS21/intro.html CSS21-intro.pdf

Current status

WeasyPrint 0.1 can fetch a remote web page from an URL, find and fetch associated stylesheets and images, and render it all to PDF or PNG.
Floats, absolute positioning and tables are not supported yet, but WeasyPrint can already be useful for pages with “simple” layout. See the features page for what exactly is supported or not.
Tables (among other things) are being worked on and should be in the next version.

http://weasyprint.org/

No comments: