SaaS.
Export, without the browser.
PDF export is the feature that sounds like an afternoon and turns into a service. The work is never the layout. It is the browser: fitting it into your deployment, capping its memory, and keeping it alive at three in the morning.
The documents
- Reports and dashboardsA period summary, usually with charts drawn by JavaScript.
- Invoices and receiptsGenerated by your billing flow, often emailed as an attachment.
- CertificatesCourse completion, compliance, membership, produced in bulk.
- Data exportsA readable version of a table your customers would otherwise download as CSV.
- Proposals and quotesBuilt from a template, branded per customer.
What running your own renderer costs
A Chromium binary is a few hundred megabytes and does not fit comfortably in a serverless function. Keeping an instance warm means paying for a browser that is idle most of the time. Browsers leak under load, so you add a process cap and a recycler. Then Chrome ships a new version. None of that work makes your product better, and all of it is yours to maintain.
Your customers' security review
If your product handles anything sensitive, your customers will ask where their data goes. Every sub-processor that stores data is a question to answer and a page in the DPA. A renderer that keeps nothing is one line in that document rather than a section, and it does not need a retention schedule.
What a request looks like
// Your existing report component, as a PDF.
const html = renderToStaticMarkup(<MonthlyReport data={data} />)
const res = await fetch("https://api.html4pdf.com/generate-pdf", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HTML4PDF_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ html, responseFormat: "binary" }),
})
return new Response(res.body, { headers: { "Content-Type": "application/pdf" } })SaaS: common questions
How long does a PDF take?
Three to five seconds for a typical document, including the round trip. For anything a user is waiting on, show a spinner. For bulk output, queue it.
Will charts drawn by JavaScript render?
Yes. The page runs in headless Chrome and scripts execute before it is captured, so Chart.js, D3 and friends draw as they do on screen.
Can I white label the output?
The PDF contains only what your markup contains. No watermark, no branding, no metadata of ours.
What does it cost at volume?
One credit per document, from $0.033 at the largest pack, with no subscription and no expiry. Past a few thousand documents a month it is worth pricing your own renderer against the time it takes to run one.
How do I keep the API key safe?
Call it from your backend only. Anything in a browser bundle is public, so proxy the request through a route of your own.
Other teams using it
- FinanceFinance teams generate invoices, statements and remittance advice without a vendor keeping a copy of customer financial data.
- HealthcareHealth tech teams generate patient summaries, statements and referral letters with PHI held only in memory, never stored, never logged.
- LegalLegal teams generate contracts, engagement letters and filings with no vendor copy outside the matter file.