Renderly vs WeasyPrint

WeasyPrint is a solid Python PDF library — but it requires a stack of system dependencies (GTK, Pango, Cairo), doesn't support JavaScript, and is limited to Python apps. Renderly is a language-agnostic REST API with Chrome-quality rendering.

Start free — no credit card →

Feature comparison

Renderly APIWeasyPrint
Language supportAny — REST APIPython only
Rendering engineChromium (Chrome-quality)Python CSS parser (Pango/Cairo)
CSS fidelityChrome-accurateGood — but diverges from browsers on complex layouts
JavaScript supportFull V8None — static HTML only
Custom fontsYes, CSS @font-faceYes, but requires GTK/Pango system fonts
Docker depsNone — cloud APIWeasyPrint + Pango + Cairo + GTK (~300MB)
Setup time~60 seconds30+ min (Python deps, system libs, Docker layers)
Cold start< 200ms2–5s for WeasyPrint import + first render
ScalingAutomaticManual — worker per process
MaintenanceNonePython version + system lib updates on you

Migration example

before.py — WeasyPrint
<span class="cm"># ❌ Before — Python-only, system dependencies required</span>
<span class="kw">from</span> weasyprint <span class="kw">import</span> HTML

pdf_bytes = HTML(<span class="fn">string</span>=html_content).<span class="fn">write_pdf</span>()
after.py — Renderly API
<span class="cm"># ✅ After — works in any language, no system deps</span>
<span class="kw">import</span> requests

res = requests.<span class="fn">post</span>(
    <span class="str">"https://api.renderlyapi.com/v1/pdf/from-html"</span>,
    headers={<span class="str">"Authorization"</span>: <span class="str">"Bearer rly_live_…"</span>},
    json={<span class="str">"html"</span>: html_content, <span class="str">"format"</span>: <span class="str">"A4"</span>},
)
pdf_bytes = res.content

Why teams switch from WeasyPrint

📦
Slim Docker images
WeasyPrint pulls in GTK, Pango, and Cairo — adding 300MB+ to Docker images. Renderly has zero system dependencies.
🌍
Not just Python
WeasyPrint is Python-only. Your Node.js, PHP, or Go services can call Renderly the same way via the REST API.
⚡
JavaScript support
WeasyPrint renders static HTML only. Renderly uses real Chrome, so chart libraries, dynamic content, and Vue/React-rendered templates all work.
🎨
Pixel-perfect layout
Complex Flexbox layouts, CSS Grid, and sticky positioning render exactly as they do in a browser — because Renderly uses Chrome.
🔒
No system lib vulnerabilities
System-level GTK and Pango have their own CVE surface. Renderly's managed API abstracts all of that away.
📈
Scales beyond a single process
WeasyPrint blocks a Python process per render. Renderly handles concurrency automatically — no worker pool tuning needed.

Drop the system dependencies

Free tier — 50 PDFs/month, no credit card, API key on sign-up.

Start for free →