blueport Login / Sign up
Blueport product · Early access

HTML2PDF

HTML in. Pixel-perfect PDF out.

One API call that renders your HTML and CSS into a print-ready PDF — invoices, statements, contracts, reports — exactly as a browser would. Real vector text, full modern CSS, headers and page numbers.

Coming to POST https://api.blueport.io/v1/html2pdf — renders typically finish in 2–5 seconds.

How it works

Three steps. One of them is yours.

You send the HTML. A real browser engine does the rendering. You get back a PDF that looks exactly like your page.

01

Post your HTML

Send inline HTML and CSS (or a URL) with your organisation's API key — merge fields welcome. That's the whole integration.

02

A real browser renders it

Headless Chrome, not a converter — full modern CSS, grid and flexbox, your web fonts, your exact brand.

03

The PDF streams back

Print-ready A4, Letter or custom sizes with headers, footers and page numbers — typically in 2–5 seconds.

Demo

One template, seen both ways

On the left, the HTML template your team already knows how to write. On the right, the PDF your customer receives — same layout, same fonts, same brand.

Template — POST /html2pdf

<style>
  .inv { font: 13px Inter; color: #112A50; }
  .tot { border-top: 2px solid #0A1931;
         font-weight: 800; }
</style>
<div class="inv">
  <h1>{{supplier.name}}</h1>
  <p>ABN {{supplier.abn}}</p>
  <h2>Tax invoice {{invoice.number}}</h2>
  <p>Bill to: {{customer.name}}</p>

  <table>
    {{#each lineItems}}
    <tr><td>{{description}}</td>
        <td>{{amount}}</td></tr>
    {{/each}}
  </table>

  <p class="tot">Total AUD {{totals.total}}</p>
  <footer>Page {{page}} of {{pages}}</footer>
</div>

The rendered PDF

Sample

Coastline Powersports Pty Ltd

ABN 84 002 749 331
14 Slipway Drive, Marlin Bay NSW 2430
accounts@coastlineps.example
Tax invoice
INV-20841
Issued: 12/08/2026
Due: 26/08/2026
Bill to
Jordan Avery · 8 Foreshore Rd, Marlin Bay NSW 2430 · jordan.avery@example.com
DescriptionQtyUnitAmount
30,000 km service — labour1289.00289.00
Oil filter HF-204124.5024.50
Engine oil 10W-40 (3.2 L)158.8058.80
Brake pads — front set189.9589.95
Subtotal (ex GST)$462.25
GST 10%$46.23
Total AUD$508.48
Three ways to call it

Start simple, graduate without rewriting

One endpoint, three input shapes. Moving from inline templates to stored ones is a one-field change — swap html for template_id and nothing else moves.

Flavour 1

Static HTML

Post the markup raw with content-type: text/html — the PDF streams straight back. Perfect for pages you already generate.

Flavour 2

Template + data, inline

Send { html, data } — Handlebars fields, loops and conditionals merge in the same call. Ideal for prototyping.

Flavour 3

Stored template + data

Store the template once, versioned server-side — then every render is just { template_id, data }. Free previews before you go live.

Compare

Prints like a browser, because it is one

Most PDF converters re-implement a slice of CSS and hope. HTML2PDF runs your markup through a real browser engine, so what you preview is what you ship.

Typical PDF converter

  • Partial CSS — flexbox and grid layouts quietly collapse
  • System fonts only; your brand type is substituted
  • Headers, footers and page numbers are an add-on syntax to learn
  • Rasterised output — blurry text, huge files, nothing selectable
  • Every template needs converter-specific workarounds

HTML2PDF

  • Full modern CSS — grid, flexbox, custom properties, print styles
  • Your web fonts, embedded and licensed as you serve them
  • Headers, footers and page numbers in plain HTML
  • True vector text — crisp at any zoom, selectable, small files
  • If it renders in Chrome, it renders in your PDF
Why teams pick it

Your brand, down to the pixel

If your team can build a web page, they can build your documents — no proprietary template language to learn.

Full modern CSS

Grid, flexbox, custom properties, print styles — a real browser engine renders exactly what your markup says.

{ }

Merge data in

Post a template with mustache-style fields and a JSON payload in the same call — one request per finished document.

#

Headers & page numbers

Running headers, footers and "Page 2 of 7" in plain HTML — the paperwork details that converters make painful.

Any paper size

A4, Letter, custom dimensions, margins and orientation per request — print-ready without a print dialog.

Fast and synchronous

Typical renders finish in 2–5 seconds and stream straight back — no job queues, no polling, no webhooks.

Private by design

Templates and data are processed in flight and never stored — only usage counts and timings are recorded.

Pricing

Simple plans, priced per render

No credit systems to decode — a render is one finished PDF. Every plan lands under 0.7¢ a render, with the same simple key and dashboard as PDF2JSON.

Basic

$12.99 /mo
billed monthly
2,000 renders
≈ 0.6¢ AUD per render
Contact us

Personal

$32.99 /mo
billed monthly
5,500 renders
≈ 0.6¢ AUD per render
Contact us
Most popular

Business

$64.99 /mo
billed monthly
12,500 renders
≈ 0.5¢ AUD per render
Contact us

Business Plus

$129.99 /mo
billed monthly
27,500 renders
≈ 0.5¢ AUD per render
Contact us

Scale

$389.99 /mo
billed monthly
87,500 renders
≈ 0.4¢ AUD per render
Contact us
1 render = one PDF, up to 20 pages Full browser CSS engine Full API access Rotatable organisation key Dashboard usage tracking Save 10% when billed annually

A render is one finished PDF of up to 20 pages. Billing is in AUD (+ GST for Australian customers); USD prices are a guide at current rates. HTML2PDF is in early access — plans start when your key does. Need more than 87,500 renders a month? Get in touch.

Integrate

Your first PDF in five minutes

If you can make an HTTP request, you're done — the PDF comes back in the response body, ready to save or send.

bash — your first render
curl -X POST https://api.blueport.io/v1/html2pdf \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: text/html" \
  --data-binary @invoice.html \
  --output invoice.pdf
HTTP 200 %PDF-1.7 · 128 KB 3.2s · A4 · 1 render billed

Ready to try it?

The guide and Postman collection are ready — HTML2PDF is in early access, so ask for a key and we'll get your first template rendering with you.