weasyprint

Package — DocumentsPython 3.7+Intermediate

Convert HTML/CSS to PDF documents

Quick Info

Documentation
Official Docs
Python Version
3.7+
Dependencies
Pillow, cssselect2, tinycss2, cffi, html5lib, pydyf, fonttools (Pango/Cairo system libraries required)
Install
pip install weasyprint

Learn by Difficulty

Quick Example

python
# Install: pip install weasyprint
import weasyprint

# Basic weasyprint usage
print(f"Using weasyprint")
# See documentation for detailed examples

weasyprint is a third-party package. Convert HTML/CSS to PDF documents. Install with: pip install weasyprint

Try in Playground

Tags

packagedocumentsfile-formatoffice