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.

Editorial title card reading "Best PDF Generation API for Indie Developers (2026)" beside the orange ZeroRaised mark.

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
  1. TL;DR
  2. Three kinds of PDF tool
  3. Comparison table
  4. The hosted APIs, one by one
  5. PDFShift: the simple default
  6. Api2Pdf: cheapest if you meter carefully
  7. DocRaptor: when the PDF is the product
  8. Template platforms: PDFMonkey, APITemplate.io, CraftMyPDF
  9. Browserless, Nutrient and DocSpring
  10. Self-hosting: free, but you own the Chromium
  11. The serverless catch
  12. Decision table by job
  13. Worked cost example: 5,000 invoices a month
  14. Frequently asked questions
  15. What is the cheapest HTML to PDF API?
  16. Which PDF API has the best free tier?
  17. Can I generate PDFs with Puppeteer on Vercel?
  18. Is wkhtmltopdf still a good choice?
  19. What should I use to fill an existing PDF form?
  20. Ship it, then launch it
  21. 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.

  1. HTML to PDF renderers. HTML or a URL in, PDF out. PDFShift, Api2Pdf, DocRaptor, Browserless, Gotenberg, Puppeteer. The template lives in your codebase.
  2. 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.
  3. 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.

ToolBilling unitFree tierEntry paid planEngineSelf-hostSource
PDFShiftCredit (per 5 MB of output)50 credits/moStarter $9/mo, 500 creditsNot statedNoPricing
Api2PdfMB bandwidth + seconds of computeOne month of free credit$1/mo + usageChrome, wkhtmltopdf, LibreOfficeNoPricing
DocRaptorDocument5 docs/mo, unlimited watermarked testsBasic $15/mo, 125 docsPrinceNoPlans, Home
PDFMonkeyDocument20 docs/mo (no external images, fonts, CSS or JS)Starter €5/mo, 300 docsChrome-based browserNoPricing
APITemplate.ioPDF or image50/mo, 3 templatesPDF Basic $19/mo, 3,000 PDFsNot statedNoPricing
CraftMyPDFCredit (1 per PDF from a template)50/mo, 3 templatesLite $29/mo, 1,200Not statedNoPricing
DocSpringCredit (20 per filled form up to 10 pages)200 credits/mo (about 10 forms), unlimited test PDFsStarter $49/mo, 10,000 creditsFills PDF templatesNoPricing
Browserless /pdfUnit (up to 30s of browser time)1k units/moPrototyping $25/mo billed annually, 20k unitsHeadless Chrome (Puppeteer)NoPricing, Docs
Nutrient DWS ProcessorCredit (HTML-to-PDF 0.5 per use)50 credits/mo, watermarkedStarter $75/mo, 1,000 creditsNot statedNoPricing
GotenbergYour serverFree (MIT)n/aChromium + LibreOfficeYesGitHub
Puppeteer / PlaywrightYour serverFree (Apache 2.0)n/aBrowser page.pdf()YesPuppeteer, Playwright
@react-pdf/rendererYour server or browserFree (MIT)n/aOwn React rendererYesGitHub
WeasyPrintYour serverFree (BSD-3-Clause)n/aOwn Python CSS layout engineYesGitHub
TypstYour serverFree (Apache 2.0)n/aTypst markup compilerYesGitHub

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 the print CSS 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 .typ files 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.

JobOur pickWhy
Invoices and receipts from my appPDFShift or Api2PdfSmall files, one credit each, low entry price
Print-quality reports, certificates, booksDocRaptorPrince engine, paged-media features, free watermarked tests
Templates a non-developer editsPDFMonkey, then CraftMyPDF or APITemplate.ioVisual editors, JSON in
Fill an existing PDF form (tax, onboarding)DocSpring, or pdf-lib if you code itBuilt for field filling
Self-host for privacy or costGotenbergMIT, Docker, Chromium and LibreOffice
Serverless on Vercel or LambdaHosted API, or @sparticuz/chromium250 MB function limit
React app, no browser binary@react-pdf/rendererPure JS, MIT
Python backend, simple layoutsWeasyPrintNo Chromium to manage
You also scrape or screenshotBrowserlessOne 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.

ToolPlan that covers 5,000Monthly cost
Api2Pdf$1 fee + (5,000 × 2s × $0.00019551) + (500 MB × $0.001)about $3.46
BrowserlessPrototyping (20k units, 1 unit per render)$25 (billed annually)
PDFMonkeyPro (3,000) + two €5 Boost Packs€25 excl. VAT
PDFShiftGrowth (5,000 credits)$39
APITemplate.ioPDF Standard (12,000)$69
CraftMyPDFProfessional (12,000)$99
DocRaptorMax (5,000)$149
Nutrient DWS2,500 credits at 0.5 each, Growth (5,000 credits)$275
GotenbergYour own serverLicence $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#

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.