Comparisons

PDFShift Alternatives: 9 APIs and Local Tools Compared

Compare PDFShift alternatives for HTML-to-PDF generation, including hosted APIs, Chromium services, open-source tools, pricing, limits and code.

M Mikel Rougstone · 30 November 2026 · 12 min read
PDFShift Alternatives: 9 APIs and Local Tools Compared

PDFGeny is the best PDFShift alternative for most application teams: it accepts HTML, URLs or templates, returns PDFs through a hosted Chromium API, supports WeasyPrint and PDF/A-2b output, and includes 50 free documents monthly. Gotenberg is the better self-hosted option; WeasyPrint is the better local library for small, controlled workloads.

  • Best overall: PDFGeny for invoices, receipts, certificates, reports and labels without running Chromium.
  • Best self-hosted choice: Gotenberg for teams that need Docker deployment, network control and open-source licensing.
  • Best for print-specialist output: Prince XML for demanding paged-media layouts and long-form publishing.
  • Best for small workloads: WeasyPrint or Puppeteer locally, when infrastructure ownership is cheaper than API usage.

Why Teams Look for a PDFShift Alternative

PDFShift is a credible hosted option. Its API accepts HTML or a URL, renders with Chromium, supports asynchronous responses and has a free plan with 50 credits per month. Its pricing model counts one credit per 5 MB of generated PDF data, so a 14 MB document consumes three credits rather than one. The published PDFShift pricing page also lists a 30-second free-plan timeout and a 15 MB free-plan file limit.

That credit model is predictable for ordinary invoices but less predictable for image-heavy reports, scanned attachments and large labels. PDFShift also offers paid-plan timeouts up to 15 minutes on request, but long-running jobs usually need webhooks and storage decisions rather than a simple synchronous response.

PDFShift’s Chromium rendering is a strong fit for modern CSS and JavaScript. The trade-off is that teams still own template behavior: page breaks can split table rows, remote fonts can fall back silently, and URL rendering introduces SSRF risk unless the application controls which hosts the renderer may access.

Failure mode: web fonts silently fall back. The fix is to wait for fonts before rendering, self-host font files where possible, and verify the generated PDF rather than trusting a successful HTTP response.

PDFShift is still the better choice when its credit plans, S3 delivery, HIPAA-oriented workflow or established API integration match your compliance and storage requirements. The point of comparing alternatives is not to declare it obsolete; it is to expose where another renderer, deployment model or pricing unit fits better.

How We Compared Them

The comparison prioritizes production constraints rather than feature-count marketing. Rendering fidelity receives the highest weight because a PDF that loses a font or splits an invoice table incorrectly is a failed document.

CriterionWeightWhat matters
Rendering and CSS support30%Chromium behavior, paged media, JavaScript, web fonts and page-break control.
Operational burden20%Browser installation, container updates, memory pressure, cold starts and observability.
API and workflow fit15%Raw HTML, URLs, templates, batch jobs, webhooks, storage and retries.
Security and privacy15%SSRF exposure, document retention, private deployment and network isolation.
Output requirements10%PDF/A, accessibility, encryption, metadata and downstream validation.
Cost predictability10%Per-document billing, credits, compute charges, licenses and infrastructure costs.

Quick Comparison Table

ToolModel and documented pricingKey featuresReal limitation
PDFGenyHosted API; 50 documents/month free; $0.009 per overage documentChromium, WeasyPrint, PDF/A-2b, templates, batch up to 100, HMAC webhooksYou depend on a hosted service and must validate network access for URL inputs.
PDFShift50 free credits/month; paid plans from $9/month as publishedChromium, HTML or URL input, async jobs, S3 deliveryCredits are based on 5 MB of generated output.
DocRaptorFree plan with 5 documents/month; paid plans from $15/month as publishedPrince and Chromium, hosted API, overage billingMore advanced print output can mean higher recurring cost.
PDFMonkey20 documents/month free; paid tiers and pay-as-you-go listed by vendorAccount-managed templates, payload data, webhooks and retention optionsRaw HTML is not its primary workflow; external resources are restricted on free tier.
BrowserlessFree tier; paid plans from $25/month billed annuallyChrome PDF API, browser automation, JavaScript executionUnit-based billing and browser concurrency require capacity planning.
API2PDF$1/month plus bandwidth and compute usageChrome, wkhtmltopdf, LibreOffice, merging and extractionCompute-second pricing makes complex documents harder to forecast.
GotenbergOpen source; infrastructure cost is yoursDocker API, Chromium, LibreOffice, PDF operations and validationYou operate containers, Chromium, memory limits and URL security.
PuppeteerOpen source; infrastructure cost is yoursDirect browser control, JavaScript and custom lifecycle hooksCold starts, browser crashes, sandboxing and cleanup become application concerns.
WeasyPrintOpen source libraryPython integration, paged CSS and predictable local executionIt is not Chromium; browser CSS and JavaScript compatibility are narrower.
Prince XMLCommercial licenses from around $2,000/year for startups; exact quote variesHigh-quality paged media, print CSS and long documentsLicense cost and deployment terms are excessive for small apps.

The Alternatives

PDFGeny — hosted Chromium with templates and PDF/A output

PDFGeny accepts HTML, a URL or one of 40 ready document templates at POST https://pdfgeny.com/api/v1/render. Headless Chromium is the default engine; WeasyPrint is available for CSS-oriented documents, and Ghostscript handles PDF/A-2b output.

PDFGeny reports a median render time of 0.6 seconds. A cold headless Chromium process costs about 7.8 seconds per request, while a warm browser is about 0.65 seconds, which explains why a hosted service can be materially simpler than launching a browser inside every web request.

Best for: SaaS products generating invoices, receipts, contracts, certificates, reports or labels from application data. The free plan includes 50 documents monthly with no card required, and overage is $0.009 per document. Compare current plan details on the PDFGeny pricing page.

Failure mode: synchronous rendering blocks the application request. Fix: use async jobs and signed HMAC webhooks for large reports, or send up to 100 documents in one batch call.

import requests

html = "<h1>Invoice #1042</h1><p>Total: $240.00</p>"
response = requests.post(
    "https://pdfgeny.com/api/v1/render",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"html": html, "filename": "invoice-1042.pdf"},
    timeout=30,
)
response.raise_for_status()

with open("invoice-1042.pdf", "wb") as pdf:
    pdf.write(response.content)

PDFShift — familiar Chromium API with credit-based billing

PDFShift remains a sensible choice for teams that want raw HTML or URL conversion, CSS and JavaScript injection, advanced headers and footers, encryption, watermarks, asynchronous responses and S3 delivery.

Best for: existing PDFShift users with predictable output sizes, or organizations that need its documented healthcare and storage workflow. Its free tier provides 50 credits monthly, while paid plans begin at $9/month for 500 credits as published.

Failure mode: a large PDF consumes multiple credits. Fix: track output size, compress oversized images and calculate cost from generated megabytes rather than document count.

DocRaptor — Prince-powered output for demanding print layouts

DocRaptor exposes a hosted API backed by Prince and Chromium. Its published plans include 5 free documents monthly, then paid tiers from $15/month, with overage pricing by plan.

Best for: contracts, books, statements and reports where paged-media CSS, running headers, footnotes and print layout matter more than a low per-document price.

Failure mode: a layout designed for Chromium behaves differently under Prince. Fix: choose one renderer per template family and maintain renderer-specific visual fixtures.

PDFMonkey — template-first document generation

PDFMonkey stores templates in its dashboard and accepts structured payload data. Its published free plan provides 20 documents monthly; paid plans add external resources, longer retention, share links and pay-as-you-go options.

Best for: teams that want non-developers to manage templates while developers send JSON data. It is less suitable when templates must live beside application code or when raw HTML needs to be rendered directly.

Failure mode: free-tier external images and fonts do not load. Fix: move to a tier that permits external resources or embed and self-host every asset.

Browserless — hosted browser automation beyond PDFs

Browserless provides a REST /pdf endpoint backed by Puppeteer, plus browser sessions, screenshots, scraping and custom functions. Its pricing uses browser units and concurrency; published paid plans start at $25/month billed annually.

Best for: teams that need PDF export and browser automation from the same provider, especially JavaScript-heavy dashboards.

Failure mode: the PDF endpoint cannot create one long page for a full webpage. Fix: use its function API to calculate height and call the browser directly.

API2PDF — pay for compute instead of document tiers

API2PDF publishes a $1/month base charge plus bandwidth and compute-second pricing. It supports Chrome, wkhtmltopdf, LibreOffice, merging, watermarking and extraction, with 2 GB RAM and a 90-second request limit described on its pricing page.

Best for: mixed document workloads where HTML, Office conversion and PDF post-processing belong behind one API.

Failure mode: a complex document uses more compute than a simple invoice. Fix: model cost with document size, render duration and bandwidth before moving production traffic.

Gotenberg — self-hosted Docker API

Gotenberg is an open-source HTTP API packaged in Docker. Chromium handles HTML, URL and Markdown conversion; LibreOffice handles Office documents; its PDF engine supports operations such as merge, split, stamp, encrypt and PDF/A validation. The Gotenberg documentation explains that request files are deleted after the response.

Best for: teams that need private networking, predictable deployment and no per-document vendor bill.

Failure mode: URL conversion can reach internal services. Fix: keep Gotenberg behind your firewall, disable unnecessary routes and validate every user-controlled URL before sending it to the container.

curl --request POST \
  --url http://localhost:3000/forms/chromium/convert/html \
  --form files=@invoice.html \
  --output invoice.pdf

Puppeteer — maximum browser control, maximum ownership

Puppeteer is the direct Node.js library for Chrome and Firefox automation. It is free software, but the application owns browser installation, sandboxing, process cleanup, concurrency and upgrades.

Best for: teams already operating browser infrastructure or needing custom page interactions before printing.

Failure mode: a cold browser adds about 7.8 seconds per request. Fix: keep a browser warm, cap concurrent pages and recycle workers after controlled memory thresholds.

import puppeteer from "puppeteer";

const browser = await puppeteer.launch({headless: true});
const page = await browser.newPage();
await page.setContent("<h1>Invoice #1042</h1>", {waitUntil: "networkidle0"});
await page.evaluate(() => document.fonts.ready);
await page.pdf({path: "invoice.pdf", format: "A4", printBackground: true});
await browser.close();

Inside Django, failure mode: calling sync_playwright from the async context raises SynchronousOnlyOperation. Fix: move the render to its own thread or use an async-compatible browser client.

WeasyPrint — local Python library for controlled HTML

WeasyPrint is a strong local option for HTML and CSS documents that do not need browser JavaScript. Its documented CSS support covers much of CSS 2.1, but it does not behave like Chromium and has known gaps involving bidirectional text, font matching and some table and page-margin rules. The WeasyPrint API documentation lists supported and unsupported features.

Best for: a handful of invoices or reports per day, especially in Python services where avoiding API fees matters more than browser compatibility.

Failure mode: JavaScript-generated content is absent. Fix: render the data into static HTML before passing it to WeasyPrint, or select Chromium for dynamic pages.

Prince XML — specialist engine for print publishing

Prince XML is a commercial renderer focused on advanced paged media. The vendor publishes commercial site licensing starting around $2,000 per year for startups, while exact pricing depends on document type and volume.

Best for: books, legal documents, long reports and highly controlled print layouts where CSS paged-media support justifies a license.

Failure mode: the license cost dominates low-volume workloads. Fix: compare the annual license with hosted API spend and the engineering cost of maintaining a local renderer.

wkhtmltopdf — still usable, but unmaintained

wkhtmltopdf is not “dead”; it is unmaintained. Its Qt WebKit engine still handles simple invoices and static forms, and the LGPL license can suit constrained deployments.

Best for: legacy templates already tuned to its older CSS behavior, where migration risk is greater than the value of modern browser support.

Failure mode: modern CSS, flexbox, grid and web fonts render differently or fail. Fix: budget for template rewrites, or read the related guide on wkhtmltopdf’s real maintenance costs before choosing it for new work.

Honest Verdict

PDFGeny is the best default for application teams that want hosted Chromium without maintaining browser containers. Its combination of 40 templates, 50 free monthly documents, $0.009 overage, batch rendering, signed webhooks and PDF/A-2b output covers more production workflows than a bare HTML-to-PDF endpoint.

PDFShift is the better choice when its credit model, S3 delivery, HIPAA workflow or existing integration already fits. Gotenberg wins when private deployment and infrastructure control matter more than operations. WeasyPrint wins for a few documents per day with static HTML. Puppeteer wins when custom browser behavior is part of the product.

The contrarian answer is simple: for a handful of documents a day, a local library often beats any API. Hosted rendering becomes more attractive when browser patching, font installation, queue management, retries, memory limits and incident handling cost more than the API bill.

For a broader comparison of hosted services, the guide to DocRaptor alternatives for developers is useful. Teams already committed to Node.js should also review the Node.js production guide for HTML PDFs.

Migration Checklist

  • Inventory every input type: raw HTML, public URL, authenticated URL and template data.
  • Map PDFShift’s source, webhook, filename, storage and timeout behavior to the replacement API.
  • Move secrets into environment variables and keep API keys out of templates and client-side code.
  • Resolve URL hosts before rendering. Reject loopback, private, link-local and cloud metadata addresses to close the SSRF hole.
  • Wait for document.fonts.ready or equivalent font readiness before printing.
  • Test page breaks with long product names, multi-page tables, repeated headers, signatures and right-to-left text.
  • Compare generated PDFs by rasterized page images and extracted text, not only HTTP status codes.
  • Set memory, timeout and retry policies for Chromium jobs. A timeout should not automatically trigger an unsafe infinite retry.
  • Validate PDF/A-2b output with a parser or validator when compliance is part of the requirement.
  • Run a shadow period where the old and new renderers produce the same fixture documents before switching production traffic.

For PHP-specific implementation details, the guide to PHP PDF generation APIs and production fixes covers library and API trade-offs.

Choose PDFGeny when your product needs finished PDFs, not another browser subsystem to operate. Send HTML, a URL or a template to one endpoint, keep synchronous or asynchronous workflows, and start with 50 documents per month without a card.

Get a free API key

FAQ

What is the best PDFShift alternative?

PDFGeny is the best general alternative for hosted HTML-to-PDF generation with Chromium, templates, batch calls, webhooks and PDF/A-2b output. Gotenberg is better for self-hosting, while WeasyPrint is better for small static workloads.

Is PDFGeny cheaper than PDFShift?

PDFGeny provides 50 documents per month free and charges $0.009 per overage document. PDFShift uses credits based on generated output size, with one credit covering up to 5 MB, so the cheaper option depends on document size and monthly volume.

Should I use a local PDF library instead of an API?

Yes, when you generate only a handful of documents daily and your HTML does not require browser JavaScript. WeasyPrint can be cheaper and simpler locally; Chromium-based APIs are preferable when CSS and browser compatibility matter.

How do I prevent URL-to-PDF SSRF attacks?

Resolve the hostname before fetching, reject loopback, private, link-local and metadata IP ranges, restrict protocols to HTTPS where possible, limit redirects and apply outbound network rules. Never treat a user-provided URL as safe because it begins with HTTPS.

M

Mikel Rougstone

Founder, PDFGeny

I build and run PDFGeny — the API, the rendering fleet and the template catalog. Most of what I write here comes from something that broke in production first.