PlutoPrint

PlutoPrint is a lightweight, high-performance Python library for generating high-quality PDFs and images directly from HTML or XML content. It builds upon the robust PlutoBook rendering engine to provide a simple yet powerful API for converting web layouts into crisp documents.

Whether you need to generate invoices, tickets, reports, or visual snapshots, PlutoPrint handles complex CSS, SVG, and print-media specific features with ease.

Key Features

  • High Fidelity: Renders HTML and CSS with precision, supporting Flexbox, absolute positioning, and custom fonts.
  • Multi-Format Export: Write to PDF or Image (PNG) formats.
  • Dual Interface: Use it as a standalone CLI tool or integrate it programmatically into your Python applications.
  • Print Media Support: Full support for @page CSS rules, custom margins, and page sizes.
  • Extensible: Custom resource fetchers allow you to load assets from databases, memory, or generated on-the-fly (e.g., Matplotlib charts).
  • Cross-Platform: Prebuilt binaries available for Windows, Linux, and macOS.

Example Output

Invoices Tickets
Invoices Tickets

License

PlutoPrint is licensed under the MIT License.