§ PDF generator API
PDF Generator API: an API PDF Generator and PDF Maker API in One Call
Generate PDFs from raw HTML or any live URL with a single HTTP request. Real Chromium rendering, your fonts and CSS intact, and a timestamped copy of every document kept on file. Try the generator below in your browser first.
- Early access, launching soon
- No card required
- Your HTML stays yours
§ Live demo
Runs in your browser. Nothing is uploaded.
Your HTML
Live preview
Your PDF is downloading. Want this as one API call, with the page archived too?
§ Short answer
A PDF generator API is an HTTP endpoint that takes HTML or a URL and returns a finished PDF, so your application never has to run a browser or a rendering library itself. You send one authenticated request with your markup and page options, and the PDF comes back in the response. Sitepdf does that job in managed Chromium and, unusually for this category, stores a timestamped snapshot of every page it renders, so you keep both the document and a dated record of it.
Last updated July 2026. Written and fact checked by the Sitepdf team.
§ 00
Four ways to generate a PDF from a program, compared
Every team generating documents lands on one of these four approaches. They differ less in output quality than in who carries the operational cost.
| Approach | What you run | Rendering fidelity | Ops burden | Keeps a dated record? |
|---|---|---|---|---|
| Headless Chrome library Puppeteer, Playwright |
A browser fleet you host, patch and scale | Excellent, it is a real browser | High: memory leaks, fonts, render drift, on call | No |
| Legacy HTML engine wkhtmltopdf |
A binary on your server | Dated: old WebKit, weak modern CSS and JS | Medium: it is stable, but stuck | No |
| Print stylesheet service PrinceXML based tools |
Nothing, it is an API | Excellent for print typography and pagination | None | No |
| Render plus archive API Sitepdf |
Nothing, it is an API | Excellent, managed Chromium with wait for selector | None | Yes, timestamped snapshot per render |
Fidelity and ops columns describe the category, not a benchmark. The honest read: if you already run a browser fleet happily and never need a record, a library is fine. The API earns its money the moment either of those stops being true.
§ 01
What a PDF generator API actually has to get right
Generating a PDF looks trivial until you do it in production. The hard parts are never the happy path. They are the invoice whose web font falls back to Times because the font server was slow. The report whose chart renders after the PDF was already written, leaving an empty box where the revenue graph should be. The statement that breaks across pages mid table, orphaning a single row of numbers on page four.
All three failures have the same root cause: something snapshotted the page before it finished becoming itself. A serious API PDF generator fixes that with a real browser engine and an explicit way to say "wait until this is on screen." Sitepdf renders in managed Chromium, so your CSS grid, your web fonts and your JavaScript all behave exactly as they do in a visitor's browser, and wait_for holds the render until the selector you name exists.
The rest is page mechanics: A4, Letter or Legal, portrait or landscape, margin presets, and header and footer templates with page numbers. Boring, and precisely the boring you should not be writing yourself.
If you are still choosing between rendering your own HTML and merging a Word template with JSON, the wider document generation API comparison sets the two engines side by side and lists what each vendor in the category actually publishes for pricing.
§ 02
The second thing every PDF maker API should return, and almost none do
Here is the gap almost nobody in this category fills. You generate a PDF because a document mattered: an invoice a customer paid against, a quote you honored, a disclosure a regulator will ask about. The file goes to the customer. What stays with you is, at best, a copy in a bucket with no provenance and an editable timestamp.
Sitepdf treats the record as part of the same job. Add archive=true to any render and the page is also stored as a timestamped, immutable snapshot under your account, retrievable by id forever after. The document goes out; the dated record stays in. One call, one bill, no second pipeline to build and no second vendor to buy. Urlbox is the one other vendor that takes records seriously, and we say so on the comparison page; everyone else hands you the file and forgets the page.
If you only need the file, leave archiving off and the render is transient: we return the PDF and store nothing.
§ 03
Generate from HTML you have, or from a URL you point at
Both inputs are the same endpoint. Send html when your app already owns the markup, which is the usual case for invoices, receipts and statements rendered from a template. Send url when the source of truth is a live page: an order confirmation, a published price, a dashboard. The URL to PDF API page covers that path in detail, and the free in-browser converter lets you sanity check output quality on your own markup before you write a line of integration code.
Batch is the same call in a loop, run concurrently against your plan's limit, which is how teams push thousands of month end statements without building a queue of their own.
§ 04
What it costs, honestly
Sitepdf is in early access. The API opens to the list in order, and planned pricing starts at $29 a month, which early access members lock for 12 months after launch. Full tiers are on the pricing page, and every planned feature on this site is labelled planned until it ships, because a vendor that fudges its own status is not one you want holding your records.
Weighing this against the alternatives is a fair thing to do before you commit. We wrote the comparison ourselves: the best HTML to PDF API, seven tools compared, including the cases where a competitor is the better buy.
curl https://api.sitepdf.com/v1/render \
-H "Authorization: Bearer $SITEPDF_KEY" \
-F [email protected] \
-F format=Letter \
-F margin=normal \
-F header_template="<span class=pageNumber></span>" \
-F archive=true
{
"pdf_url": "https://api.sitepdf.com/v1/documents/doc_4mq07.pdf",
"pages": 3,
"rendered_in_ms": 1890,
"archive": {
"id": "arc_b41ke",
"captured_at": "2026-07-14T11:20:07Z",
"retrieve_url": "https://api.sitepdf.com/v1/archives/arc_b41ke"
}
}
The API is in early access; this is the documented call shape it opens with. Full request and response walkthrough.
§ 05
Questions about this job
What is a PDF generator API?
How much does a PDF generator API cost?
Is there a free PDF generator API?
Should I use an open source PDF generator instead?
Can the API generate a PDF from a URL as well as from HTML?
Does the API keep a copy of the PDFs it generates?
§ Index
More PDF and archiving tools
- Convert HTML to PDF
- Webpage to PDF
- Save webpage as PDF
- URL to PDF API
- Website archiving
- Screenshot API
- React to PDF
- Laravel HTML to PDF
- Vue to PDF
- Next.js PDF generator
- Angular to PDF
- Markdown to PDF API
- Django HTML to PDF
- Blazor HTML to PDF
- Spring Boot HTML to PDF
- Airtable to PDF
- Rails HTML to PDF
- Document generation API
- Bulk HTML to PDF
- Wayback Machine alternative
- Best HTML to PDF API
- DocRaptor alternative
- Puppeteer alternative
- Wkhtmltopdf alternative
- PDFShift alternative
- Urlbox alternative
- PDFCrowd alternative
- Api2Pdf alternative
- Browserless alternative
- APITemplate alternative
- CraftMyPDF alternative
- PDFMonkey alternative
- dompdf alternative
- Gotenberg alternative
- GrabzIt alternative
- How it works
- Features
- Pricing
§ Early access
Get on the early-access list
The API opens to the list first, in order. Early access locks the planned launch rates for 12 months. No card required, launching soon.