WeasyPrint is a Python library that requires Cairo, Pango, and other system dependencies. PixDoc needs nothing installed — just send an HTTP request and get a PDF back, with full Chromium rendering.
| Feature | PixDoc | WeasyPrint |
|---|---|---|
| Setup | API key, one HTTP call | pip install + system deps (Cairo, Pango, GDK) |
| Rendering Engine | Chromium (latest) | Custom engine (Cairo-based) |
| CSS Support | Full CSS3, flexbox, grid, variables | Good CSS3, partial flexbox, no grid |
| Scaling | Auto-scales, managed infrastructure | Python process per render |
| Templates | Built-in template engine with variables | Use Jinja2 separately |
| Screenshots | Built-in endpoint for PNG/JPEG/WebP | PDF and PNG only |
| Async / Webhooks | Built-in webhook delivery | Not available |
| Pricing | Flat $29/mo for 5,000 renders | Free and open source |
See how much simpler it is to generate a PDF with PixDoc.
# Install system dependencies first
# sudo apt-get install libcairo2 libpango-1.0-0 libgdk-pixbuf2.0-0
# pip install weasyprint
from weasyprint import HTML
html_string = "<h1>Invoice #1042</h1>"
HTML(string=html_string).write_pdf(
"invoice.pdf",
stylesheets=["styles.css"],
presentational_hints=True,
)
# Requires Python + Cairo + Pango + GDK-PixBuf
# CSS grid not supported, limited flexboxcurl -X POST https://pixdoc.dev/api/v1/pdf \
-H "Authorization: Bearer pd_live_..." \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Invoice #1042</h1>"}' \
-o invoice.pdfStart generating PDFs, screenshots, and OG images in minutes. No browser management, no infrastructure, no per-document fees.