HomeAPIHTML to PDF API

HTML to PDF API for invoices, reports and certificates

POST some HTML or a URL and get back a PDF, rendered by a real browser so it looks like the page does in print preview, with margins, headers, footers and page numbers you control.

The free plan includes 100 screenshots a month through the API (the PDF API starts with the Developer plan). Public sign-up is opening soon.

Illustration with sample data. It mirrors the real app screen.
Just Frugkit. The Frugkit mascot, an orange toolbox in sunglasses, gives a thumbs up next to the words.

Who it's for

SaaS and e-commerce teams

Invoices, receipts, statements and order confirmations generated from the same HTML templates you already render.

Agencies and internal-tools developers

Reports and certificates from dashboards or templates, without running your own headless browser.

Automation builders

Anything that can POST JSON can produce a PDF. Zapier, Make and n8n modules are on the roadmap.

How it works

  1. Write the HTML

    Use the HTML and CSS you would use on the web, including print styles. Use absolute URLs for images and stylesheets.

  2. POST it

    Send html or a public url to /api/v1/pdf with your key, plus options such as paper format, margins and header and footer templates.

  3. Save the PDF

    The response is the PDF, with the page count in a header. Prefer JSON? Ask for response=json to get it base64-encoded.

What you get

HTML or URL in

Render a string of HTML (up to 5 MiB) or a public web address.

Paper and layout

A0 to A6, Letter, Legal, Tabloid and Ledger, portrait or landscape, with margins as one value or per side (px, in, cm or mm).

Headers, footers and page numbers

HTML templates for the header and footer with date, title, URL, page number and total pages.

Page ranges and scale

Include only pages like 1-3, 5, and scale the rendering from 0.1 to 2.

Print backgrounds

Background colours and images are printed by default (print_background), and you can switch that off.

Usage in the response

Each response reports your monthly usage and limit in headers, and the number of pages in the PDF.

An invoice in one request

Header and footer templates support the classes date, title, url, pageNumber and totalPages. They need a top or bottom margin to be visible.

curl -X POST https://app.frugkit.com/api/v1/pdf \
  -H "Authorization: Bearer $FRUGKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Invoice 1042</h1><p>Thanks for your business.</p>",
       "format":"A4","margin":"20mm","print_background":true,
       "footer_template":"<div style=\"font-size:9px;width:100%;text-align:center\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>"}' \
  --output invoice.pdf

Honest limits

We would rather you know before you sign up than find out afterwards.

  • The PDF API starts on the Developer plan. The free plan includes screenshots only.
  • Pages are the unit. A PDF costs one unit per page against your monthly allowance (100 on Developer, 500 on Growth, 5,000 on Scale). A PDF that crosses the allowance is delivered; the next one is refused.
  • Relative links do not resolve in HTML you send. Use absolute URLs for images and styles.
  • Public resources only. The page and everything it loads must be reachable from the public internet, and private networks are refused.
  • Limits per request: render time up to 60 seconds, HTML up to 5 MiB, output up to 25 MiB. Reusable stored templates are not available yet.

Coming soon

On our roadmap, not available yet.

  • Reusable templates you call by name
  • Zapier, Make and n8n modules

Frugkit API pricing

The free plan includes 100 screenshots a month through the API (the PDF API starts with the Developer plan). Pay monthly and cancel any time.

Developer

$29 / month
  • 2,000 screenshots a month
  • 100 PDF pages a month
  • 5 API keys
  • 3 users

Growth

$99 / month
  • 10,000 screenshots a month
  • 500 PDF pages a month
  • 20 API keys
  • 10 users

Scale

$499 / month
  • 75,000 screenshots a month
  • 5,000 PDF pages a month
  • 100 API keys
  • 25 users

Want every suite? All Access is $99 a month. Prices exclude any sales tax or VAT, added at checkout where required. Billing is handled by our reseller Paddle.com.

Questions

How do I convert HTML to PDF with an API?

POST your HTML (or a public URL) as JSON to /api/v1/pdf with your API key as a Bearer token and optional settings such as format and margin. The response body is the PDF.

Does it support page numbers?

Yes. Provide a header_template or footer_template using the classes pageNumber and totalPages, and give the page a matching margin so there is room to show it.

What plan do I need?

The PDF API is included from the Developer plan ($29 a month, 100 PDF pages), and in All Access. The free plan covers screenshots only.

Is the PDF rendered by a real browser?

Yes, Chromium, so modern CSS and JavaScript work, and what you see in print preview is what you get.

Can I store templates with you?

Not yet. You send the HTML with each request. Stored, reusable templates are on the roadmap.

How large can a PDF be?

Up to 25 MiB of output from up to 5 MiB of HTML, and a render of up to 60 seconds.

Get early access

We are opening Frugkit to people in small groups. Tell us what you would use it for and we'll email you when your invite is ready.