pdf.xhub

Convert HTML to PDF — pixel-perfect, no template lock-in

POST raw HTML, receive a print-ready PDF. Full modern CSS support, custom fonts, edge-runtime compatible. Hosted in Frankfurt and Paris.

Headless ChromiumEdge runtimePDF/A-1, A-2, A-3 modes

Why convert HTML to PDF?

Layout that survives the print boundary

Custom fonts, flexbox, grid, and CSS print media queries render exactly as you designed them — no surprise spacing or font fallbacks.

No DSL, no proprietary template engine

Write standard HTML+CSS. Reuse your existing component library. Switch providers without rewriting templates.

Archive-ready output

PDF/A-1b, PDF/A-2b, PDF/A-3 modes for long-term legal storage. Optional digital signatures for tamper-evident archives.

How HTML-to-PDF rendering works

1. Send your HTML

POST a JSON body with your HTML string and optional render options (page size, margins, headers, footers) to /v1/render.

2. We render with headless Chromium

Our EU-resident render workers spin up a Chromium instance, apply your CSS, wait for fonts and images, and serialize to PDF.

3. Receive PDF bytes or signed URL

Sync responses return the PDF inline. Async mode returns a signed download URL via webhook for large jobs.

What is the pdf.xhub HTML-to-PDF API?

pdf.xhub is a developer-first, EU-hosted PDF generation API built for engineering teams that need to ship invoices, account statements, contracts, and reports without a US data-transfer audit trail. The HTML-to-PDF endpoint is the foundation: anything you can render in a browser, you can render to PDF.

Try it in your stack

Same endpoint. Copy as cURL, call from any language.

POST raw HTML with full modern CSS — fonts, flexbox, grid, print media queries.

curl -X POST https://api.pdf.xhub.io/v1/render \
  -H "Authorization: Bearer $PDFXHUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "html",
    "html": "<h1>Hello</h1>",
    "pageSize": "A4",
    "margin": "20mm"
  }' --output hello.pdf

Features at a glance

Rendering

  • HTML5 + CSS3 with custom web fonts (auto-cached)
  • Flexbox, grid, and modern layout primitives
  • Print media queries with @page rules
  • Custom headers, footers, and page numbers
  • Watermarking (text or image)
  • Page-size + margin presets (A4, Letter, A3, custom)

Security & Compliance

  • PDF/A-1b, PDF/A-2b, PDF/A-3 output modes
  • Optional digital signatures (PAdES)
  • Encryption with user/owner password
  • GDPR-compliant by default — DPA + SCCs included

Platform

  • EU hosting: Frankfurt + Paris (no US fallback)
  • Headless Chromium fleet, auto-updated weekly
  • Edge-runtime callable, sub-100ms cold-start
  • OpenAPI 3.1 spec for type-safe clients
  • Webhook + async-job API for batch renders
  • Rate limit 1,500 req/min on Business tier

Other ways to render

Same API, different inputs.

Ship your first HTML-rendered PDF

25 docs/month free forever. Bring your existing CSS — no template lock-in.