Your HTML and CSS
Print the markup your application already produces. No PDF-specific layout library, no second implementation of a document you have already built once.
HTML to PDF API
Generate statements, reports, contracts and certificates from the HTML and CSS your application already renders. One request in, a finished document back, with the paper size, margins and repeating furniture you set.
Create a free accountRead the API docs
One request
Most PDF libraries ask you to rebuild a layout you have already written in HTML and CSS, in a drawing API with its own units, fonts and box model. The document on screen and the document in the attachment then drift apart, and every change costs twice.
Ironfang Render prints the markup you already have, in a real browser, with the paper size, margins, scale and repeating header and footer set per request. One template, two outputs, one place to change it.
POST /render/v1/pdf
Authorization: Bearer if_live_...
Content-Type: application/json
{
"html": "<html>...your document...</html>",
"paper_format": "a4",
"print_background": true,
"margin": { "top": 0.6, "bottom": 0.8 },
"header_html": "<span></span>",
"footer_html": "<p style='font-size:9px'>Page <span class='pageNumber'></span></p>"
}
200 OK
Content-Type: application/pdfCapabilities
The print settings you would otherwise chase through a browser dialogue, set per request and identical every time.
Print the markup your application already produces. No PDF-specific layout library, no second implementation of a document you have already built once.
A3, A4, A5, Letter, Legal and Tabloid, portrait or landscape, with margins and a scale factor set per request.
Supply header and footer HTML and it appears on every page, which is where page numbers, logos and document references belong.
Turn on print backgrounds and your tints, panels and brand colours come through instead of being dropped the way a browser drops them.
The same headers, Authorization header and cookies as a screenshot request, so an authenticated statement prints as easily as a public page.
The PDF comes back in the response. No job to poll, no bucket to read from, unless you want the asynchronous path for long documents.
Use cases
Anywhere your application already renders the content and somebody needs it as a file.
Period statements and remittance advice, rendered from the same template your account screens already use.
Attach a printable confirmation to the email your application already sends, produced from one request.
Turn a dashboard or a report page into a document somebody can file, print or forward.
Personalise per recipient with variables, and composite a verified QR code into the layout.
Produce consistent, branded documents from HTML rather than from a word processor template nobody owns.
Print an authenticated view on a schedule so the weekly pack builds itself.
Send the HTML, or a url instead, to POST /render/v1/pdf with your API key. A success is 200 with Content-Type: application/pdf and the document as the body. Anything else is JSON, {"error": {"code", "message"}}, so check the status before saving the body as a PDF. This renders the invoice template from the guide:
curl -sS https://api.ironfang.com/render/v1/pdf \
-H "Authorization: Bearer $IRONFANG_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.json \
-o invoice.pdf \
-w '%{http_code} %{content_type}\n'200 application/pdf means invoice.pdf is the invoice. Download request.json, the HTML template it was built from, or the PDF it produces.
@page size."header_html": "<span></span>" with it.print_background is true.@font-face from a public URL or data URI. Images and stylesheets must be reachable from the public internet.break-inside: avoid keeps a row or block whole, and a table's thead repeats on each page.
A billing run needs more than one rendered document: thousands of them on the first of the month, an archived copy you own, and a download link a customer can use without your application streaming the bytes. That has its own page, and the invoice PDF guide has a complete invoice template, the request that renders it and the PDF it produces.
Pricing
Start with 250 free credits each month and no card required. Paid plans begin at £9 per month for 5,000 credits, shared across screenshots, PDFs, images and video. Failed work is refunded, and reaching a cap pauses rendering rather than billing overage.
Questions
The details that decide whether this fits, without reading the whole reference first.
Less to operate. More to ship.
Create an account, take a key and send your existing HTML. The first PDF is inside your free credits.
250 free credits each month, with no card required, hard usage caps and refunds on failed work.