Normalize, or preserve — your call
HTML-to-PDF has two flavors and a2pdf supports both.
Normalize (default)
Your HTML is converted to Markdown first, then re-rendered with one of four typographic themes. You get the content of the page in a clean, opinionated layout. Useful when the source styling is generic or ugly and you want something better.
Preserve source styling
Tick the "Preserve" checkbox in PDF Settings. Your HTML — including its own <style> blocks and inline CSS — gets rendered as-is via headless Chromium. You're effectively printing the page to PDF, with only the @page rule injected for paper-size control.
What about external resources?
For pasted/uploaded HTML, external resources (images, stylesheets, fonts via CDN) aren't pre-fetched — the rendering happens server-side from a data: URL. If you need a "screenshot of a live webpage" PDF instead, use the URL mode (or the dedicated webpage to PDF page), which navigates to the real URL and grabs everything.
Use cases
- Convert an email template to a PDF for archiving.
- Generate invoice PDFs from server-side HTML rendering.
- Save AI-generated HTML artifacts (Claude's HTML canvas, ChatGPT-generated HTML) as documents.
- Take an embedded blog post and turn it into a printable PDF.
Developers
If you want to drive this from code:
curl -X POST https://a2pdf.com/convert \ -F "text=<h1>Hello</h1><p>World</p>" \ -F "format=html" \ -F "theme=business" \ -F "preserve=0" \ -o output.pdf
Set preserve=1 to keep your CSS intact. See the full HTTP API docs or the MCP server for AI-agent integration.