Documentation − How to Start

WeasyPrint is visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. Major facts:

It is based on various libraries but not on a full rendering engine like Blink, Gecko or WebKit. The CSS layout engine is written in Python, designed for pagination, and meant to be easy to hack on. You can find the list of supported features on the dedicated chapter of the documentation.

On Linux, installing can be as easy as:

    
|> pip install weasyprint
|> weasyprint https://weasyprint.org/ weasyprint.pdf
  

WeasyPrint is also available as a library in a Python application, embedding in a website or an application is often straightforward. You can even use extra libraries dedicated to some famous Python web frameworks, such as Flask-WeasyPrint or Django-WeasyPrint.

Please check the installation guide in the documentation for further information.