Best PDF Generation API for Indie Developers (2026)
For most indie developers turning HTML into invoices, receipts and reports, PDFShift is the simplest paid default: 50 free credits a month, then $9/mo for 500. Api2Pdf is the cheapest metered option at $1 a month plus usage. DocRaptor costs more but renders with Prince for print-quality layouts. If you can run a container, Gotenberg (MIT) is free.

Key takeaways
- PDFShift has 50 free credits a month, then Starter at $9/mo for 500 and Growth at $39/mo for 5,000, with a credit counted per 5 MB of output.
- Api2Pdf charges $1 a month plus $0.001 per MB and $0.00019551 per second of compute, and runs Chrome, wkhtmltopdf and LibreOffice on every endpoint.
- DocRaptor is the Prince-based option: 5 free documents a month, Basic $15/mo for 125, Max $149/mo for 5,000, and unlimited watermarked test documents.
- For templates a non-developer can edit, PDFMonkey starts at €5/mo for 300 documents, CraftMyPDF at $29/mo for 1,200 and APITemplate.io at $19/mo for 3,000.
- Free to self-host: Gotenberg (MIT), Puppeteer and Playwright (Apache 2.0), @react-pdf/renderer (MIT), WeasyPrint (BSD-3-Clause) and Typst (Apache 2.0). wkhtmltopdf was archived on 2 Jan 2023.
On this page 21
- TL;DR
- Three kinds of PDF tool
- Comparison table
- The hosted APIs, one by one
- PDFShift: the simple default
- Api2Pdf: cheapest if you meter carefully
- DocRaptor: when the PDF is the product
- Template platforms: PDFMonkey, APITemplate.io, CraftMyPDF
- Browserless, Nutrient and DocSpring
- Self-hosting: free, but you own the Chromium
- The serverless catch
- Decision table by job
- Worked cost example: 5,000 invoices a month
- Frequently asked questions
- What is the cheapest HTML to PDF API?
- Which PDF API has the best free tier?
- Can I generate PDFs with Puppeteer on Vercel?
- Is wkhtmltopdf still a good choice?
- What should I use to fill an existing PDF form?
- Ship it, then launch it
- Sources
Short answer: For most indie developers turning HTML into invoices, receipts and reports, PDFShift is the simplest paid default: 50 free credits a month, then $9/mo for 500. Api2Pdf is the cheapest metered option at $1 a month plus usage, and DocRaptor is the pick when layout quality matters more than price. If you can run a container, self-host Gotenberg for free.
Every price, limit and licence below comes from the vendor's own pricing page, docs or GitHub repo, checked on 13 Nov 2026. The advice in between is ours and is marked as such.
TL;DR#
- Best simple default: PDFShift. Free plan with 50 credits a month and no card, Starter $9/mo for 500, Growth $39/mo for 5,000. A credit is "counted per 5 MB of generated data" (PDFShift).
- Cheapest metered: Api2Pdf at "$1 / month" plus "$0.001 / MB bandwidth · $0.00019551 / sec compute" (Api2Pdf).
- Best print quality: DocRaptor, "the only HTML to PDF API that uses the Prince PDF generator" (its claim), from $15/mo for 125 documents (DocRaptor).
- Templates someone else edits: PDFMonkey from €5/mo, APITemplate.io and CraftMyPDF with drag-and-drop editors.
- Free and private: Gotenberg (MIT) in Docker, or Puppeteer/Playwright
page.pdf()in your own worker.
Disclosure: ZeroRaised publishes this guide and is a launch site for bootstrapped products. ZeroRaised has no commercial relationship with any vendor named here and earns nothing if you sign up. Facts come from the linked sources as checked on 13 Nov 2026.
Three kinds of PDF tool#
Most "PDF API" shortlists mix three different products, and picking the wrong kind is how you overpay.
- HTML to PDF renderers. HTML or a URL in, PDF out. PDFShift, Api2Pdf, DocRaptor, Browserless, Gotenberg, Puppeteer. The template lives in your codebase.
- Template platforms. Design in their editor, send JSON. PDFMonkey, APITemplate.io, CraftMyPDF. Useful when a non-developer needs to change the layout without a deploy.
- PDF form fillers and processors. You start from an existing PDF and fill fields, merge, watermark or sign. DocSpring, Nutrient DWS, pdf-lib.
If you are reading PDFs rather than writing them, that is the opposite problem, covered in our guide to the best OCR API for indie developers.
Comparison table#
Entry prices are monthly at the lowest paid tier, from each vendor's own page on 13 Nov 2026. "Not stated" means we could not find the claim on the vendor's own page today, not that it is false.
| Tool | Billing unit | Free tier | Entry paid plan | Engine | Self-host | Source |
|---|---|---|---|---|---|---|
| PDFShift | Credit (per 5 MB of output) | 50 credits/mo | Starter $9/mo, 500 credits | Not stated | No | Pricing |
| Api2Pdf | MB bandwidth + seconds of compute | One month of free credit | $1/mo + usage | Chrome, wkhtmltopdf, LibreOffice | No | Pricing |
| DocRaptor | Document | 5 docs/mo, unlimited watermarked tests | Basic $15/mo, 125 docs | Prince | No | Plans, Home |
| PDFMonkey | Document | 20 docs/mo (no external images, fonts, CSS or JS) | Starter €5/mo, 300 docs | Chrome-based browser | No | Pricing |
| APITemplate.io | PDF or image | 50/mo, 3 templates | PDF Basic $19/mo, 3,000 PDFs | Not stated | No | Pricing |
| CraftMyPDF | Credit (1 per PDF from a template) | 50/mo, 3 templates | Lite $29/mo, 1,200 | Not stated | No | Pricing |
| DocSpring | Credit (20 per filled form up to 10 pages) | 200 credits/mo (about 10 forms), unlimited test PDFs | Starter $49/mo, 10,000 credits | Fills PDF templates | No | Pricing |
Browserless /pdf | Unit (up to 30s of browser time) | 1k units/mo | Prototyping $25/mo billed annually, 20k units | Headless Chrome (Puppeteer) | No | Pricing, Docs |
| Nutrient DWS Processor | Credit (HTML-to-PDF 0.5 per use) | 50 credits/mo, watermarked | Starter $75/mo, 1,000 credits | Not stated | No | Pricing |
| Gotenberg | Your server | Free (MIT) | n/a | Chromium + LibreOffice | Yes | GitHub |
| Puppeteer / Playwright | Your server | Free (Apache 2.0) | n/a | Browser page.pdf() | Yes | Puppeteer, Playwright |
| @react-pdf/renderer | Your server or browser | Free (MIT) | n/a | Own React renderer | Yes | GitHub |
| WeasyPrint | Your server | Free (BSD-3-Clause) | n/a | Own Python CSS layout engine | Yes | GitHub |
| Typst | Your server | Free (Apache 2.0) | n/a | Typst markup compiler | Yes | GitHub |
We left out PDF.co and ConvertAPI. PDF.co's pricing page lists plans from $8.99/mo (billed annually) for 16,500 credits, but we could not find how many credits an HTML-to-PDF page costs. ConvertAPI's prices page offers 250 free conversions but did not show plan prices when we checked. Without those numbers, they cannot be compared fairly.
The hosted APIs, one by one#
PDFShift: the simple default#
PDFShift is a plain HTML-or-URL-in, PDF-out API. The free plan gives 50 credits a month with no card, and includes CSS and JavaScript injection, headers and footers, encryption and watermarking, with a 15 MB maximum file size and a 30-second timeout. Paid tiers run Starter $9/mo (500), Boost $24/mo (2,500), Growth $39/mo (5,000) and Business $99/mo (25,000), with overage from $0.04 down to $0.02 per credit across those tiers. Annual billing is ten months for the price of twelve, and unused credits do not roll over (PDFShift).
Our read: invoices and receipts are tiny, so the "per 5 MB" rule means one credit per document in practice. Only image-heavy reports will cost more than one credit.
Api2Pdf: cheapest if you meter carefully#
Api2Pdf charges a $1 monthly fee (starting 30 days after sign-up, with one month of free credit) plus bandwidth and compute. Every endpoint offers "Chrome, wkhtmltopdf, LibreOffice, merge, watermark, barcodes", and the page's own example says 10,000 PDFs a month at 0.1 MB and 2 seconds each cost "about $5.91" (Api2Pdf).
Our read: the catch is unpredictability. Slow pages with web fonts and remote images cost more compute seconds, so keep templates self-contained.
DocRaptor: when the PDF is the product#
DocRaptor runs Prince rather than a browser, which matters for print features like repeating headers and footers, mixed page sizes in one document and accessibility tagging (all vendor claims) (DocRaptor). It is also the most expensive per document: Free 5/mo, Basic $15 for 125, Professional $29 for 325, Premium $75 for 1,250, Max $149 for 5,000 (DocRaptor plans). The page says "test documents are always free", and the homepage says every account gets "unlimited watermarked test documents".
Our read: pay for DocRaptor when you sell the PDF itself (a report, a certificate, a printed book), not for a receipt nobody prints.
Template platforms: PDFMonkey, APITemplate.io, CraftMyPDF#
These let you design once and send JSON from your app.
- PDFMonkey renders in "a Chrome-based browser". Free gives 20 documents a month but blocks external images, fonts, CSS and JS. Starter is €5/mo for 300, Pro €15/mo for 3,000, Pro+ €60/mo for 5,000, prices excluding VAT. Paid plans can add pay-as-you-go from €0.008 per extra document, or Boost Packs of 1,000 documents for €5, but not both (PDFMonkey).
- APITemplate.io is free for 50 images or PDFs a month with 3 templates, then PDF Basic $19/mo for 3,000 PDFs and PDF Standard $69/mo for 12,000. The page shows these as discounted from $24 and $89 and does not say which billing cycle applies. It lists no overage rate outside enterprise plans (APITemplate.io).
- CraftMyPDF includes its drag-and-drop editor, REST API and Zapier, Make.com and Bubble.io integrations on the free plan (50 a month, 3 templates). Lite is $29/mo for 1,200, Plus $49/mo for 3,000, Professional $99/mo for 12,000. It lists no overage: you upgrade instead (CraftMyPDF).
Browserless, Nutrient and DocSpring#
Browserless is a hosted headless browser with a /pdf REST endpoint that takes either a url or an html field and returns application/pdf (Browserless docs). Billing is in units, where "A “Unit” is a block of browser time of up to 30 seconds per browser connection", with 1k free a month and Prototyping at $25/mo billed annually for 20k (Browserless pricing). Good if you also scrape or screenshot.
Nutrient DWS Processor API lists HTML-to-PDF at 0.5 credits per use. Free gets 50 credits a month with a "For Evaluation Purposes Only" watermark; Starter is $75/mo for 1,000 credits (Nutrient). Our read: priced for teams that also need OCR, redaction and conversion, not for an indie invoice run.
DocSpring fills existing PDF templates. A filled form of up to 10 pages costs 20 credits; the free Developer plan has 200 credits (about 10 forms) and unlimited test PDFs, Starter is $49/mo for 10,000 credits (about 500 forms). When credits run out, live PDFs wait and the API returns HTTP 402 rather than billing overage (DocSpring). If your PDFs then need signatures, see our DocuSign alternatives for solo founders.
Self-hosting: free, but you own the Chromium#
- Gotenberg is "A developer-friendly API for converting many document formats into PDF files", MIT-licensed, using headless Chromium for HTML, URL and Markdown and LibreOffice for office files (GitHub). Run the container next to your app and call it over HTTP.
- Puppeteer
page.pdf()"Generates a PDF of the page with theprintCSS media type" (Puppeteer docs). Puppeteer and Playwright are both Apache 2.0. - @react-pdf/renderer (MIT) is a "React renderer for creating PDF files on the browser and server", with no browser binary at all (GitHub).
- WeasyPrint (BSD-3-Clause) is written in Python and is "not on a full rendering engine like WebKit or Gecko" (GitHub).
- Typst (Apache 2.0) is "A markup-based typesetting system", compiling
.typfiles straight to PDF (GitHub). - wkhtmltopdf: the repository "was archived by the owner on Jan 2, 2023. It is now read-only" (GitHub). Do not start new projects on it.
- pdf-lib (MIT) "can create, fill, and read PDF form fields" for the form-filling job (GitHub).
The serverless catch#
Vercel caps a function at 250 MB uncompressed and names "Puppeteer with its bundled Chromium" as a common cause of oversized functions. It also has a large functions beta up to 5 GB, and Hobby functions run for a maximum of 300 seconds (Vercel docs). The usual workaround is @sparticuz/chromium (MIT), "Chromium for Serverless Platforms", which ships a Brotli-compressed binary of about 33 MiB and a -min variant for hosts with file size limits.
A minimal Puppeteer shape looks like this:
const page = await browser.newPage();
await page.setContent(invoiceHtml, { waitUntil: "networkidle0" });
const pdf = await page.pdf({ format: "A4", printBackground: true });
Our read: on Vercel or Lambda at a few hundred PDFs a month, a hosted API is less work than wrangling Chromium. Past a few thousand, or with sensitive documents, a Gotenberg container on a box you already run usually wins.
Decision table by job#
This is our editorial advice, based on the published prices and features above.
| Job | Our pick | Why |
|---|---|---|
| Invoices and receipts from my app | PDFShift or Api2Pdf | Small files, one credit each, low entry price |
| Print-quality reports, certificates, books | DocRaptor | Prince engine, paged-media features, free watermarked tests |
| Templates a non-developer edits | PDFMonkey, then CraftMyPDF or APITemplate.io | Visual editors, JSON in |
| Fill an existing PDF form (tax, onboarding) | DocSpring, or pdf-lib if you code it | Built for field filling |
| Self-host for privacy or cost | Gotenberg | MIT, Docker, Chromium and LibreOffice |
| Serverless on Vercel or Lambda | Hosted API, or @sparticuz/chromium | 250 MB function limit |
| React app, no browser binary | @react-pdf/renderer | Pure JS, MIT |
| Python backend, simple layouts | WeasyPrint | No Chromium to manage |
| You also scrape or screenshot | Browserless | One bill for browser work |
If you would rather not build invoicing at all, compare our best invoicing software for solo founders first.
Worked cost example: 5,000 invoices a month#
Example, not a quote. Assume 5,000 one-page invoices a month, each about 0.1 MB and rendering in about 2 seconds, on monthly billing at prices checked 13 Nov 2026.
| Tool | Plan that covers 5,000 | Monthly cost |
|---|---|---|
| Api2Pdf | $1 fee + (5,000 × 2s × $0.00019551) + (500 MB × $0.001) | about $3.46 |
| Browserless | Prototyping (20k units, 1 unit per render) | $25 (billed annually) |
| PDFMonkey | Pro (3,000) + two €5 Boost Packs | €25 excl. VAT |
| PDFShift | Growth (5,000 credits) | $39 |
| APITemplate.io | PDF Standard (12,000) | $69 |
| CraftMyPDF | Professional (12,000) | $99 |
| DocRaptor | Max (5,000) | $149 |
| Nutrient DWS | 2,500 credits at 0.5 each, Growth (5,000 credits) | $275 |
| Gotenberg | Your own server | Licence $0, plus hosting you pay for |
Our read: at this volume hosted options range from under $4 to $275 a month for the same 5,000 PDFs. Api2Pdf's figure moves with render time, so a 6-second page triples the compute line. PDFShift at $39 buys predictability. DocRaptor is only worth $149 if layout quality is part of what customers pay for.
Frequently asked questions#
What is the cheapest HTML to PDF API?#
On published prices, Api2Pdf is the cheapest metered API: $1 a month plus $0.001 per MB of bandwidth and $0.00019551 per second of compute. Its own example puts 10,000 small PDFs at about $5.91 a month. If you can run a container, self-hosted Gotenberg costs nothing in licence fees.
Which PDF API has the best free tier?#
Browserless has 1k units a month free, and a unit is up to 30 seconds of browser time, so a quick PDF render is one unit. Among PDF-specific APIs, PDFShift, APITemplate.io and CraftMyPDF each give 50 a month, PDFMonkey 20 and DocRaptor 5, though DocRaptor test documents are unlimited and watermarked.
Can I generate PDFs with Puppeteer on Vercel?#
It is possible but awkward. Vercel's docs cap uncompressed function bundles at 250 MB and name Puppeteer with its bundled Chromium as a common cause of large functions. The @sparticuz/chromium package ships a Brotli-compressed Chromium for serverless hosts, and Vercel now has a large functions beta up to 5 GB. Many indie devs call a hosted API instead.
Is wkhtmltopdf still a good choice?#
Not for new projects. Its GitHub repository says it was archived by the owner on 2 Jan 2023 and is read-only. Use a Chromium-based tool such as Gotenberg or Puppeteer, or WeasyPrint if you want a Python engine without a browser.
What should I use to fill an existing PDF form?#
If you want an API, DocSpring is built for it: a filled PDF form of up to 10 pages costs 20 credits, and the free Developer plan has 200 credits a month (about 10 forms) plus unlimited test PDFs. If you want a library, pdf-lib (MIT) says it can create, fill and read PDF form fields.
Ship it, then launch it#
Invoices that render properly are one of those details that make a small product feel finished. When yours is ready, work through how to launch a bootstrapped app, then submit it to ZeroRaised for free. For more no-nonsense tool comparisons, join the ZeroRaised newsletter.
Sources#
- PDFShift pricing, last checked 13 Nov 2026
- Api2Pdf pricing, last checked 13 Nov 2026
- DocRaptor plans, last checked 13 Nov 2026
- DocRaptor homepage, last checked 13 Nov 2026
- PDFMonkey pricing, last checked 13 Nov 2026
- APITemplate.io pricing, last checked 13 Nov 2026
- CraftMyPDF pricing, last checked 13 Nov 2026
- DocSpring pricing, last checked 13 Nov 2026
- Browserless pricing, last checked 13 Nov 2026
- Browserless /pdf API docs, last checked 13 Nov 2026
- Nutrient DWS Processor API pricing, last checked 13 Nov 2026
- PDF.co pricing, last checked 13 Nov 2026
- ConvertAPI prices, last checked 13 Nov 2026
- Gotenberg on GitHub, last checked 13 Nov 2026
- Puppeteer on GitHub, last checked 13 Nov 2026
- Puppeteer page.pdf() docs, last checked 13 Nov 2026
- Playwright on GitHub, last checked 13 Nov 2026
- @react-pdf/renderer on GitHub, last checked 13 Nov 2026
- WeasyPrint on GitHub, last checked 13 Nov 2026
- Typst on GitHub, last checked 13 Nov 2026
- wkhtmltopdf on GitHub, last checked 13 Nov 2026
- pdf-lib on GitHub, last checked 13 Nov 2026
- @sparticuz/chromium on GitHub, last checked 13 Nov 2026
- Vercel Functions limits, last checked 13 Nov 2026
Frequently asked questions
What is the cheapest HTML to PDF API?
On published prices, Api2Pdf is the cheapest metered API: $1 a month plus $0.001 per MB of bandwidth and $0.00019551 per second of compute. Its own example puts 10,000 small PDFs at about $5.91 a month. If you can run a container, self-hosted Gotenberg costs nothing in licence fees.
Which PDF API has the best free tier?
Browserless has 1k units a month free, and a unit is up to 30 seconds of browser time, so a quick PDF render is one unit. Among PDF-specific APIs, PDFShift, APITemplate.io and CraftMyPDF each give 50 a month, PDFMonkey 20 and DocRaptor 5, though DocRaptor test documents are unlimited and watermarked.
Can I generate PDFs with Puppeteer on Vercel?
It is possible but awkward. Vercel's docs cap uncompressed function bundles at 250 MB and name Puppeteer with its bundled Chromium as a common cause of large functions. The @sparticuz/chromium package ships a Brotli-compressed Chromium for serverless hosts, and Vercel now has a large functions beta up to 5 GB. Many indie devs call a hosted API instead.
Is wkhtmltopdf still a good choice?
Not for new projects. Its GitHub repository says it was archived by the owner on 2 Jan 2023 and is read-only. Use a Chromium-based tool such as Gotenberg or Puppeteer, or WeasyPrint if you want a Python engine without a browser.
What should I use to fill an existing PDF form?
If you want an API, DocSpring is built for it: a filled PDF form of up to 10 pages costs 20 credits, and the free Developer plan has 200 credits a month (about 10 forms) plus unlimited test PDFs. If you want a library, pdf-lib (MIT) says it can create, fill and read PDF form fields.