All posts

Best PDF Libraries and APIs: 12 Tools for Generating, Converting and Viewing PDFs

26โ€“40 minutes
Best PDF Libraries and APIs: 12 Tools for Generating, Converting and Viewing PDFs, featured image

PDF libraries and APIs turn your application's data into PDF files, or open, edit, fill, sign and render PDFs that already exist. This comparison covers twelve of them, from free open-source libraries you import into your code to commercial SDKs and hosted APIs that bill per document, and it follows one job through every entry: a two-page invoice generated from order data, about 5,000 times a month.

The tools work in three different ways. A library runs inside your own process, a self-hosted service runs next to your application in a container, and a hosted API receives your HTML or JSON and sends a PDF back. That choice matters more than the feature list, though: who patches the renderer, where customer data travels, and whether you pay per document, per developer or not at all.

PDF libraries and APIs compared
12
are free open-source projects: Puppeteer, Gotenberg, WeasyPrint and PDF.js, plus the Community license of QuestPDF and the AGPL edition of iText
6
lowest paid monthly plan here (PDFShift Starter and PDF Generator API Creator)
$9
Office formats Gotenberg converts to PDF through LibreOffice
100+

Our picks and the comparison table

ToolTypeRuns inLicenseStarting price (USD)
iTextPDF SDK (Java, .NET)Java, .NETAGPLv3 or commercialQuote for commercial use
AprysePDF SDK (server, web, mobile).NET, Java, C++, Node.js, Python, Go, PHP, RubyCommercialPackages from $1,500
NutrientPDF SDK and cloud APIAny language over REST; self-hosted DockerCommercialFree tier; Starter $75/month
PuppeteerOpen-source headless browser (Node.js)Node.jsApache-2.0Free
GotenbergOpen-source PDF API (Docker)Any language over HTTP; DockerMITFree
WeasyPrintOpen-source HTML-to-PDF library (Python)PythonBSD-3-ClauseFree
Adobe PDF Services APICloud PDF APIJava, .NET, Node.js, Python, RESTCommercial cloud serviceFree tier; then quote
DocRaptorCloud HTML-to-PDF APIAny language over RESTCommercial cloud serviceFree (5 docs); $15/month
PDFShiftCloud HTML-to-PDF APIAny language over RESTCommercial cloud serviceFree (50 docs); $9/month
PDF Generator APITemplate-based document generation APIAny language over REST; no-code connectorsCommercial cloud service$9/month; 14-day free sandbox
PDF.jsOpen-source PDF viewer (JavaScript)Browser JavaScriptApache-2.0Free
QuestPDFPDF library (.NET).NET (C#)Community or commercialFree under $1M revenue; $1,999

Prices are list prices in USD from each vendor's site on December 1, 2026. Free means no license fee; you still pay for the servers that run it.

The first table shows how each tool is licensed and where it runs. The second shows which part of the PDF job it covers, because a library that prints HTML can't fill a form and a viewer can't create a document.

ToolCreate from HTMLCreate from code or templatesEdit, merge, fill existing PDFsRender or viewPDF/A or PDF/UA
iTextYes, pdfHTML add-onYes, layout API in Java and .NETYes, forms, merge, signaturesNoPDF/A-1 to A-4, PDF/UA-1 and UA-2
ApryseYes, HTML templatesYesYes, plus OCR and redactionYes, WebViewerPDF/A; PDF/UA via Autotagging add-on
NutrientYesYes, templates and MarkdownYes, plus OCR and redactionYes, viewer APIPDF/A and PDF/UA
PuppeteerYes, headless ChromeNoNoNoNo
GotenbergYes, ChromiumNoMerge, split, fill and flatten formsNoPDF/A and PDF/UA
WeasyPrintYes, own layout engine, no JavaScriptNoNoNoNot listed
Adobe PDF Services APIYesYes, Word templatesCombine, OCR, extractNoAuto-tagging for accessibility
DocRaptorYes, Prince engineNoNoNoAccessibility tagging (ISO 14289)
PDFShiftYes, ChromiumNoNoNoNot listed
PDF Generator APIYes, HTML to PDF endpointYes, visual templates plus JSONFill forms, watermark, encryptViewer output modePDF/UA tagging
PDF.jsNoNoNoYes, in the browserNo
QuestPDFNoYes, C# layout APINot covered hereNoNot covered here

What are PDF libraries and APIs?

A PDF library is code you add to your own application that writes or reads the PDF file format, for example iText in a Java service or WeasyPrint in a Python app. A PDF API is a service you call over HTTP: you send HTML, a URL, a template ID with JSON data or an existing PDF, and you get a PDF or extracted data back. The work is the same. What's different is where it runs and who maintains the engine.

Most PDF jobs fall into four groups:

  • Generate. Turn data into a new document: invoices, reports, tickets, certificates. You either print HTML with a browser engine (Puppeteer, Gotenberg, DocRaptor, PDFShift), lay the page out in code (iText, QuestPDF) or fill a designed template (PDF Generator API, Adobe Document Generation).
  • Manipulate. Merge, split, stamp, encrypt, fill and flatten forms, or sign documents that already exist. SDKs such as iText and Apryse cover this; browser-based renderers don't.
  • Extract. Pull text, tables or form values out of PDFs, for example to process supplier invoices. Adobe's Extract API and the OCR features of Apryse and Nutrient handle this.
  • View. Show a PDF inside a web or mobile app without downloading it. PDF.js does this for free; Apryse WebViewer and Nutrient add annotation, forms and signing.
What to check before you pick a PDF tool
  • Write down the input: HTML you already have, data plus a template, Office files or existing PDFs
  • Check whether templates need JavaScript, web fonts or CSS paged media such as running headers and page counters
  • Decide where customer data may go: your own servers, a vendor cloud, or a vendor region such as the EU
  • Read the license before you ship: AGPL code in a closed product needs a commercial license
  • Count documents and pages per month, because hosted APIs bill per document, per credit or per operation
  • List archive and accessibility requirements such as PDF/A or PDF/UA
  • Name an owner for every API key and renderer container

How we chose these tools

We looked for tools a small development or IT team can adopt this quarter and checked each one against the same invoice job: how a document is described, where rendering happens, what the license or plan counts, and what the tool can't do. We read vendor pricing pages, documentation, license files and release notes and didn't run every product ourselves. Version numbers and release dates come from each project's repository on December 1, 2026.

Large document automation suites and e-signature platforms aren't reviewed here. Several well-known libraries are listed in a short table further down instead of full entries, either because they cover one narrow job or because they are no longer maintained.

PDF SDKs for creating and editing documents

These SDKs run inside your application or on your own servers and cover the whole document lifecycle: create, edit, fill, sign, convert and validate.

iText

iText Core is a Java and .NET library for creating and manipulating PDFs, dual-licensed under the AGPLv3 and a commercial license.

PDF SDK (Java, .NET)No G2 rating

A Java and .NET library for creating and manipulating PDFs at the object level, with the pdfHTML add-on for HTML and CSS input.

The invoice job. Your service builds the invoice with iText's layout API (paragraphs, tables, images) or writes it as an HTML template and converts it with pdfHTML, all inside the JVM or .NET process. The same library can then apply a PAdES signature, attach the order data for e-invoicing workflows and save the result as PDF/A for archiving, which matters when invoices have to be kept for years.

Beyond generation. iText fills, extracts and flattens AcroForms and XFDF data, splits and merges documents and gives low-level access to PDF objects when a document needs repairs. Version 9.8.1, released on November 16, 2026, is a security patch: it fixes two ways to bypass signature revision validation and updates the Jackson dependency, so teams that validate signed PDFs on 9.8.0 should upgrade.

The license decision. iText Core is released under the AGPLv3. If your application isn't open source under the same terms, you need a commercial license: an annual subscription priced by the number of PDFs processed, or an OEM license for software you distribute. Neither price is published.

Choose it when
  • your back end runs on Java or .NET and has to produce PDF/A-1 to PDF/A-4 or PDF/UA-1 and PDF/UA-2 output for archives or accessibility
  • you need PAdES digital signatures and AcroForm fill, extract and flatten in the same library
  • HTML templates should become PDFs inside the JVM through the pdfHTML add-on, without a browser process
Skip it when
  • you ship closed-source software and can't buy a license: the AGPL requires you to publish your application's full source code
  • you need a public price before a trial: the subscription is priced by the number of PDFs you process and comes as a quote
iText Core product page describing the Java and .NET PDF library and its AGPL and commercial licenses
iText Core is offered under the AGPL or a commercial license.
Starting price
AGPLv3 open source, or a commercial license: annual volume subscription priced by PDFs processed, or OEM; quote only
Languages
Java, .NET (C#)
License
AGPLv3 or commercial
Latest release
9.8.1 (November 16, 2026)
Standards
PDF/A-1 to PDF/A-4, PDF/UA-1 and PDF/UA-2, PAdES

Apryse

Apryse, formerly PDFTron, sells PDF SDKs for servers, browsers and mobile apps: the Server SDK, WebViewer and Mobile SDK, with add-ons for editing, conversion and signatures.

PDF SDK (server, web, mobile)No G2 rating

Apryse, formerly PDFTron, sells PDF SDKs for servers, browsers and mobile apps from one document engine.

The invoice job. On the server, the Apryse SDK generates documents from HTML templates, merges attachments, applies digital signatures and converts the result to PDF/A. If customers later need to review or annotate invoices in your portal, WebViewer renders and annotates PDFs client-side, and its UI is WCAG 2.2 AA compliant.

What else it covers. OCR, redaction and form creation sit in the same SDK, with add-ons for a DOCX editor, a spreadsheet editor, digital signatures, smart data extraction and conversion. PDF/UA tagging comes through the Autotagging add-on. The Server SDK runs on-premises or in any public or private cloud.

Buying it. Pricing is mostly quote-based; the pricing page states entry-level packages from $1,500. A 40-day evaluation counts active days only, and after it ends the library stops working until a license key is added.

Choose it when
  • one vendor should cover server-side conversion, OCR, redaction and PDF/A as well as a WCAG 2.2 AA browser viewer and editor (WebViewer)
  • your stack mixes languages: the Server SDK has bindings for .NET, Java, C++, Node.js, Python, Go, PHP and Ruby
  • the documents must stay on your own servers or private cloud
Skip it when
  • your budget sits below the $1,500 entry-level package
  • you only need HTML to PDF: the SDK and add-on packaging is sized for full document workflows
Apryse WebViewer showcase with a PDF open and annotation tools in the toolbar
Apryse WebViewer showcase: view, edit, markup and document generation demos.
Starting price
Quote only; entry-level packages from $1,500; 40-day free evaluation
Languages
.NET, Java, C++, Node.js, Python, Go, PHP, Ruby
Deployment
On-premises, public or private cloud; WebViewer runs client-side
Trial
40 active days

Nutrient

Nutrient, formerly PSPDFKit, offers PDF SDKs and the Document Web Services (DWS) API for generating, converting, OCRing, redacting and signing documents in the cloud or self-hosted.

PDF SDK and cloud APINo G2 rating

Nutrient, formerly PSPDFKit, sells PDF SDKs and the Document Web Services (DWS) API, priced per operation in the cloud or licensed for self-hosting.

The invoice job. You send HTML, a template or Markdown to the DWS Processor API and get a PDF back; each HTML-to-PDF conversion costs $37.50 per 1,000 operations on pay-as-you-go. At 5,000 invoices a month that's $187.50 of usage. The Starter plan at $75 a month includes $90 of usage, and Growth at $275 includes $345, with a prepaid wallet covering the rest.

Other operations. The same API converts Office files and images, runs OCR at $1.50 per 1,000 pages, redacts, compresses, validates PDF/A and PDF/UA and auto-tags documents for accessibility. A Viewer API adds forms, annotations and eSignature in the browser. Rates differ by operation: PDF/A conversion and redaction cost $75 per 1,000, Office-to-PDF and compression $150, and digital signatures $750.

Running it yourself. Document Engine is the same engine as a Docker-ready server with an annual license, or as a managed cloud for enterprise contracts. Nutrient publishes a SOC 2 Type 2 report and a SOC 3 report.

Choose it when
  • you want metered cloud pricing per operation, for example $37.50 per 1,000 HTML-to-PDF or forms operations and $1.50 per 1,000 OCR pages
  • the same engine should run as a cloud API or self-hosted: Document Engine is Docker-ready with an annual license
  • your security review asks for a SOC 2 Type 2 report
Skip it when
  • you send mostly Office files or need compression: those operations cost $150 per 1,000, four times the HTML-to-PDF rate
  • free-tier output has to be clean: it stays watermarked until you add a wallet
Nutrient Web SDK playground with a PDF open in the viewer and the example browser
Nutrient Playground: viewer, forms, annotations and signing examples.
Starting price
DWS API: Free with $5 of usage a month; Starter $75/month ($90 usage); Growth $275/month ($345 usage); pay-as-you-go from $37.50 per 1,000 HTML-to-PDF operations; Enterprise quote
Deployment
Cloud API, self-hosted Document Engine (Docker), Managed Cloud
Free tier
$5 of usage per month, no card
Compliance
SOC 2 Type 2, SOC 3

Headless browsers and self-hosted renderers

These free tools turn HTML into PDF on infrastructure you run. You don't pay per document, but you do own the servers, the scaling and the security updates of the rendering engine.

Puppeteer

Puppeteer is Google's Node.js library for controlling Chrome or Firefox; its page.pdf() call renders a page to PDF with the print CSS media type.

Open-source headless browser (Node.js)No G2 rating

Google's Node.js library for controlling Chrome or Firefox; page.pdf() prints any page or HTML string to PDF.

The invoice job. You render the invoice as an HTML page with your usual template engine, open it in a headless browser page and call page.pdf() with paper size, margins and header and footer templates. Chrome applies the print CSS media type, so the PDF looks like the browser's print preview; by default it adjusts colors for printing, and the CSS property -webkit-print-color-adjust keeps backgrounds exact. JavaScript charts, web fonts and flexbox layouts render as they do on screen.

Running it in production. The puppeteer package downloads a matching Chrome build, while puppeteer-core skips the download and connects to a browser you already run. Every render opens a browser page in memory, so throughput depends on how many Chrome instances your servers can keep warm. A queue in front of a small pool of browsers keeps memory use predictable.

Playwright works the same way. Microsoft's Playwright offers the same page.pdf() call for Node.js, Python, Java and .NET, which helps if your back end isn't JavaScript. In current Playwright code only the Chromium backend implements PDF output.

Choose it when
  • your templates already are web pages with modern CSS, web fonts and JavaScript charts that need a real browser engine
  • you run Node.js and want PDF output without a per-document fee
  • you also need screenshots or browser automation from the same dependency
Skip it when
  • you can't host and scale headless Chrome yourself: every render is a browser page in memory
  • you need to fill forms, merge or sign existing PDFs: page.pdf() only prints pages
Puppeteer documentation for the page.pdf() method with its signature and options
Puppeteer page.pdf() generates a PDF with the print CSS media type.
Starting price
Free, Apache-2.0 (you run and pay for the Chrome processes)
Language
Node.js (Playwright offers page.pdf() for Node.js, Python, Java and .NET)
License
Apache-2.0
Latest release
26.0.0 (December 2, 2026)

Gotenberg

Gotenberg is an MIT-licensed Docker container that exposes an HTTP API for converting HTML, URLs, Markdown and Office files to PDF and for merging, splitting and signing PDFs.

Open-source PDF API (Docker)No G2 rating

An MIT-licensed Docker container that exposes PDF conversion and editing as an HTTP API, using Chromium and LibreOffice.

The invoice job. You start the container with one command, docker run --rm -p 3000:3000 gotenberg/gotenberg:9, and post the invoice HTML as a multipart form to its Chromium route. Any language that can send an HTTP request can use it, so a PHP shop and a Go service can share the same internal PDF endpoint.

Beyond HTML. The LibreOffice route converts more than 100 Office formats, including Word, Excel and PowerPoint. Other routes merge, split, rotate and stamp PDFs, fill or flatten forms, sign, encrypt, redact, convert to and validate PDF/A and PDF/UA (including Factur-X invoices), and turn pages into images.

What you operate. Gotenberg is a service, not a library: you size the container, keep it off the public internet and update the image when Chromium or LibreOffice get security fixes. Version 9.11.1 was released on December 1, 2026.

Choose it when
  • any language should call one internal HTTP endpoint instead of embedding a library
  • you convert Word, Excel and PowerPoint files as well as HTML: LibreOffice handles 100+ formats
  • you need PDF/A or PDF/UA conversion, Factur-X, merge, split, form flattening and encryption without a license fee
Skip it when
  • you can't run containers: it's a service you operate, not a library you import
  • you want a vendor SLA and support contract behind document generation
Gotenberg documentation showing the docker run command and a curl request that prints a web page to PDF
Gotenberg starts with one docker run command and converts over HTTP.
Starting price
Free, MIT (self-hosted container)
Runs as
Docker container (gotenberg/gotenberg:9)
License
MIT
Latest release
9.11.1 (December 1, 2026)
Engines
Chromium, LibreOffice

WeasyPrint

WeasyPrint is a BSD-licensed Python library that turns HTML and CSS into PDF with its own layout engine built for pagination.

Open-source HTML-to-PDF library (Python)No G2 rating

A BSD-licensed Python library that lays out HTML and CSS for print with its own engine, without a browser.

The invoice job. A Django or Flask app renders the invoice template to HTML and passes it to WeasyPrint, which paginates it with CSS paged media: page sizes and margins, running headers and footers, page counters and page breaks. There's no Chrome binary to install or keep patched, so containers stay small.

The trade-off. WeasyPrint doesn't use a browser engine and runs no JavaScript, so charts must be rendered server-side, for example as SVG, before the HTML reaches it. Version 70.0 came out on September 8, 2026 and requires Python 3.10 or newer.

Choose it when
  • your back end is Python and reports are static HTML with print CSS such as page margins, running headers and page counters
  • you don't want a browser binary on the server: the layout engine is pure Python
Skip it when
  • your templates rely on JavaScript, for example client-side charts: WeasyPrint runs no JavaScript
  • you're still on Python 3.9 or older: version 70 requires Python 3.10 or newer
WeasyPrint 70.0 documentation listing its Python dependencies for installation
WeasyPrint 70.0 installs as a Python package with Pango.
Starting price
Free, BSD-3-Clause
Language
Python
License
BSD-3-Clause
Latest release
70.0 (September 8, 2026)

Hosted PDF APIs

A hosted API takes the renderer off your servers entirely. You send HTML, a URL or JSON and pay per document, credit or operation, and the vendor handles scaling and engine updates.

Adobe PDF Services API

Adobe PDF Services API is Adobe's cloud API for creating, converting, combining, OCRing, auto-tagging and extracting PDFs, with SDKs for Java, .NET, Node.js and Python.

Cloud PDF APINo G2 rating

Adobe's cloud API for creating, converting, combining and analyzing PDFs, with SDKs for Java, .NET, Node.js and Python.

The invoice job. The Document Generation API merges JSON data into a Word template and returns a PDF, or the HTML to PDF operation converts static or dynamic HTML, a zip file or a URL. Each endpoint call counts as one document transaction, so merging 20 files and then running OCR on the result uses two.

What sets it apart. PDF Extract returns text, tables and document structure as JSON, which helps when you process incoming supplier PDFs rather than only generating your own. Auto-tagging adds accessibility tags, and electronic seals use AATL certificates. Calls run in the US by default and can be sent to the EU region in Ireland.

Limits and pricing. Files can be up to 100 MB, combine and split take up to 20 documents, and the free tier allows 25 requests per minute. Adobe publishes a free tier of 500 document transactions; paid volumes are sold through an Enterprise quote.

Choose it when
  • you need PDF Extract to pull text, tables and structure out of existing PDFs as JSON
  • accessibility auto-tagging and electronic seals with AATL certificates should come from the same API
  • documents should be processed in the EU: the SDK can switch a call to the Ireland region
Skip it when
  • you handle protected health information: Adobe's support FAQ says the service is not HIPAA compliant
  • you need high throughput on the free tier: it allows 25 requests per minute
Adobe PDF Services API page with the create, convert, transform and OCR overview
Adobe PDF Services API: create, convert, transform and OCR PDFs.
Starting price
Free tier of 500 document transactions; paid usage via Enterprise quote
SDKs
Java, .NET, Node.js, Python, REST
Limits
100 MB per file; 20 documents per combine
Compliance
SOC 2 Type 2, ISO 27001

DocRaptor

DocRaptor is a hosted API that converts HTML to PDF and Excel using the Prince engine, with unlimited watermarked test documents on every account.

Cloud HTML-to-PDF APINo G2 rating

A hosted HTML-to-PDF and HTML-to-Excel API that renders with the Prince engine.

The invoice job. You post the invoice HTML to the API and receive the PDF, or let DocRaptor host it at an unbranded URL. Prince supports CSS Paged Media, the W3C standard for print layout, including page margin boxes for headers and footers, footnotes and page counters, and DocRaptor adds a multi-pass JavaScript mode plus asynchronous and parallel generation.

Plans. The free plan covers 5 documents a month, Basic $15 covers 125, Professional $29 covers 325, Premium $75 covers 1,250 and Max $149 covers 5,000. Bronze ($399, 15,000) and Silver ($1,000, 40,000) follow, then Enterprise. Every account gets unlimited watermarked test documents, so development doesn't count against the plan. Overage is a per-document price that depends on the plan.

Compliance. DocRaptor states that it is SOC 2 and HIPAA compliant, and it tags documents for WCAG 2.0, Section 508 and ISO 14289 accessibility.

Choose it when
  • print layout matters: Prince supports CSS Paged Media with page margin boxes for headers and footers, footnotes and page counters
  • you also export spreadsheets: the same API outputs XLS and XLSX
  • your vendor review requires SOC 2 and HIPAA
Skip it when
  • volume runs past 40,000 documents a month: the next step is an Enterprise quote
  • the data may not leave your network: DocRaptor runs only as a hosted service
DocRaptor documentation with a sample HTML-to-PDF API request in JSON
DocRaptor accepts HTML in a JSON request; test documents are free.
Starting price
Free (5 docs/month); Basic $15 (125); Professional $29 (325); Premium $75 (1,250); Max $149 (5,000); Bronze $399 (15,000); Silver $1,000 (40,000); Enterprise quote
Engine
Prince
Output
PDF, XLS, XLSX
Compliance
SOC 2, HIPAA, GDPR
Testing
Unlimited watermarked test documents

PDFShift

PDFShift is a hosted API that renders HTML or URLs to PDF with Chromium and bills one credit per document per 5 MB of output.

Cloud HTML-to-PDF APINo G2 rating

A hosted API that converts HTML or a URL to PDF with Chromium and bills one credit per document per 5 MB.

The invoice job. One POST with the HTML or a URL returns the PDF; options cover headers and footers with page numbers, text or image watermarks, and password protection. A two-page invoice stays well under 5 MB, so 5,000 invoices use 5,000 credits, which is the Growth plan at $39 a month.

Plans. Free gives 50 credits a month with a 15 MB file limit and a 30-second timeout. Starter costs $9 for 500 credits, Boost $24 for 2,500, Growth $39 for 5,000 and Business $99 for 25,000, and the Shift plans go up to 1,000,000 credits for $999. Annual billing costs ten times the monthly price. Overage per credit falls from $0.04 on Starter to $0.001 on Shift 1M, and unused credits don't roll over.

Data handling. By default PDFShift doesn't store documents or requests. Paid plans allow 100 seconds per conversion, and PDFShift can raise that to 15 minutes on request.

Choose it when
  • you want a published price ladder from 500 to 1,000,000 documents a month with per-credit overage from $0.04 down to $0.001
  • documents shouldn't be stored: requests and output aren't kept by default
  • long renders need time: paid plans allow 100 seconds, extendable to 15 minutes on request
Skip it when
  • you need to edit, fill or sign existing PDFs: it only converts HTML and URLs
  • your output files are large: each 5 MB counts as another credit
PDFShift API reference introduction listing PDF, PNG, JPEG and WEBP conversion
PDFShift converts HTML to PDF, PNG, JPEG or WebP.
Starting price
Free (50 credits/month); Starter $9 (500); Boost $24 (2,500); Growth $39 (5,000); Business $99 (25,000); up to Shift 1M $999 (1,000,000); annual = 10x monthly
Engine
Chromium
Free plan
50 credits, 15 MB, 30 s timeout
Output
PDF, PNG, JPEG, WebP

PDF Generator API

PDF Generator API is a document generation service: you design templates in its editor, send JSON to a REST API and get PDFs back, and your own users can edit templates in a white-label editor.

Template-based document generation APINo G2 rating

A template-based document generation API: you design templates in a visual editor, send JSON over REST and receive PDFs.

The invoice job. You build the invoice template once, with the AI template builder, by importing an existing PDF or in the drag-and-drop editor, and map data fields such as {invoice::number} to your JSON. Your app then calls the REST API with a JWT signed by your API secret and the order data, synchronously, asynchronously with a callback URL, or in batches that merge several templates into one document. The PDF comes back as base64, as a file, or as a URL that stays available for 30 days.

Templates your customers edit. The editor can be embedded white-label in your own SaaS or ERP through an iframe, so customers change their own logos, tables and terms without a developer. It has dynamic tables with repeating headers, barcodes, QR codes, charts, expressions for calculations and conditional formatting, and the editor UI comes in 8 languages.

More than generation. The same account includes HTML to PDF, PDF form filling, watermarking and encryption, PDF to image, document signing in the browser, web forms, PDF/UA tagging and e-invoices in XRechnung and Factur-X format. Connectors exist for Zapier, Make, n8n, Airtable and Bubble, plus an MCP server for AI assistants.

Plans. Creator costs $9 a month for 50 credits, Starter $59 for 1,000, Basic $99 for 5,000, Professional $199 for 15,000 and Enterprise $699 for 250,000, and annual billing costs ten times the monthly price. A document of up to 5 pages uses 1 credit, so the 5,000 two-page invoices fit Basic. Every account starts with a 14-day sandbox with 50 credits and no card, and test documents with a preview stamp are unlimited. The company, Actual Reports in Tallinn, Estonia, holds ISO 27001:2022 and offers dedicated instances in Virginia, Frankfurt, London or Sydney, with HIPAA and a BAA available on dedicated deployments.

Choose it when
  • your SaaS customers should design their own invoices or contracts in a white-label editor you embed in an iframe
  • templates should be built by non-developers with drag-and-drop tables, barcodes, QR codes, charts and conditions, while developers keep HTML and CSS
  • you produce e-invoices: XRechnung and Factur-X are API endpoints, with QR codes and PDF/UA tagging in the same account
Skip it when
  • you'd rather keep templates as code in your repository: here they live in the editor and are versioned through the API
  • your vendor review asks for a SOC 2 report: the company holds ISO 27001:2022 and publishes a DPA instead
PDF Generator API embedded template editor showing a delivery note template with table, image and barcode tools
The white-label template editor embeds in your SaaS through an iframe.
Starting price
Creator $9/month (50 credits); Low Usage $29 (250); Starter $59 (1,000); Basic $99 (5,000); Professional $199 (15,000); Premium $399 (50,000); Enterprise $699 (250,000); annual = 10x monthly; 14-day free sandbox
API
REST v4, JWT auth, sync, async with callback, batch
Output
PDF or HTML; base64, file, 30-day URL or viewer
Credits
1 credit per 5 pages
Integrations
Zapier, Make, n8n, Airtable, Bubble, MCP server

Open-source libraries for one job

These free libraries do one part of the PDF job very well. They are often combined with one of the tools above.

PDF.js

PDF.js is Mozilla's Apache-licensed JavaScript library for parsing and rendering PDFs in the browser, the same viewer Firefox uses.

Open-source PDF viewer (JavaScript)No G2 rating

Mozilla's JavaScript library for parsing and rendering PDFs in the browser, the viewer built into Firefox.

The invoice job. PDF.js doesn't create the invoice. It shows it: your customer portal loads the PDF with the pdfjs-dist package and renders pages to a canvas, with a text layer for search and selection, so invoices open inside the app instead of a download. Version 6.5.438 was released on November 1, 2026.

Choose it when
  • users should open PDFs inside your web app without a plugin or a commercial viewer license
  • you need page rendering and text extraction in the browser, for example for previews or search
Skip it when
  • you need to create PDFs: PDF.js reads and renders, it doesn't generate documents
PDF.js web viewer rendering a research paper with zoom and toolbar controls
The PDF.js viewer renders PDFs in the browser.
Starting price
Free, Apache-2.0
Language
JavaScript (browser, pdfjs-dist on npm)
License
Apache-2.0
Latest release
6.5.438 (November 1, 2026)

QuestPDF

QuestPDF is a .NET library that composes PDFs in C# with a fluent layout API, free under a Community license for organizations below $1 million in annual revenue.

PDF library (.NET)No G2 rating

A .NET library that composes documents in C# with a fluent layout API instead of HTML.

The invoice job. The invoice becomes a C# class: header, table of line items and footer described with QuestPDF's layout API, which keeps the template in your repository, under code review and covered by unit tests. There's no browser or HTML engine involved.

The license. The Community license is free for organizations with less than $1,000,000 in annual gross revenue, individuals, charities, academic institutions and open-source projects, but not for public-sector bodies or listed companies. Professional costs $1,999 and Enterprise $4,999, both perpetual with unlimited developers and 12 months of updates.

Choose it when
  • your team writes C# and wants invoices and reports as typed, testable code instead of HTML templates
  • a one-time Professional license for unlimited developers fits better than per-document fees
Skip it when
  • you work for a public-sector body or a listed company: they need a paid license regardless of revenue
  • designers should edit templates without a developer: layouts live in C# code
QuestPDF homepage presenting the code-first PDF library for C#
QuestPDF builds documents in C# code.
Starting price
Community license free under $1M annual revenue; Professional $1,999 and Enterprise $4,999 (perpetual, unlimited developers, 12 months of updates)
Language
.NET (C#)
License
Community (free) or Professional/Enterprise
Latest release
2026.9.2 (November 12, 2026)

Other PDF libraries worth knowing

These projects are widely used for narrower jobs or older stacks. Still, check the maintenance status before you build on them, because two of them haven't shipped a release in years.

LibraryLanguage and licenseWhat it doesStatus on December 1, 2026
pdf-libTypeScript and JavaScript, MITCreates and modifies PDFs, fills and flattens forms; no HTML input, no text extractionLast release 1.17.1 in November 2021
PDFKitJavaScript for Node.js and browsers, MITGenerates PDFs with vector graphics, fonts, tables, forms and PDF/UA tagsRelease 0.21.0 on November 20, 2026
Apache PDFBoxJava, Apache License 2.0Extracts text, splits and merges, fills forms, signs and renders pages to imagesReleases 3.0.8 and 2.0.37 in July 2026
PyMuPDFPython, AGPLv3 or Artifex commercial licenseExtracts text, renders pages, edits annotations and form fields, merges documentsRelease 2.2 on November 25, 2026
wkhtmltopdfC++ command-line tool, LGPL-3.0Converts HTML to PDF with the old QtWebKit engineRepository archived; the project advises against untrusted HTML

What PDF libraries and APIs cost

The billing units differ: open-source tools cost only the servers you run, SDKs are licensed per developer, product or document volume, and hosted APIs bill per document, credit or operation. This table puts them on one example: 5,000 two-page invoices a month.

ToolPrice (USD)Billing unitExample: 5,000 two-page invoices a month
iTextAGPL free; commercial quoteAnnual subscription by PDFs processed, or OEMAsk iText for a volume quote
AprysePackages from $1,500QuoteAt least $1,500
NutrientFree ($5 usage), Starter $75, Growth $275 a monthPer operation, $37.50 per 1,000 HTML-to-PDF$187.50 of usage; Starter includes $90 of it
PuppeteerFreeYour serversHosting for a small pool of headless Chrome instances
GotenbergFreeYour serversHosting for one or more containers
WeasyPrintFreeYour serversHosting inside your existing Python app
Adobe PDF Services APIFree tier of 500 transactions; then quotePer document transactionAbove the free tier, so an Enterprise quote
DocRaptorFree (5), $15 (125) to $1,000 (40,000) a monthPer document$149 a month on Max (5,000 documents)
PDFShiftFree (50), $9 (500) to $999 (1,000,000) a monthPer credit (document per 5 MB)$39 a month on Growth (5,000 credits)
PDF Generator API$9 (50 credits) to $699 (250,000 credits) a monthPer credit (document per 5 pages)$99 a month on Basic (5,000 credits)
PDF.jsFreeNoneNot a generator; free for viewing
QuestPDFFree under $1M revenue; Professional $1,999 one timePer organization$0 or $1,999 once, plus your servers

Choosing by job

  • Invoices and reports from a Java or .NET back end, with signatures and PDF/AiText, or QuestPDF for .NET teams under $1M revenue
  • HTML templates with JavaScript charts, rendered on your own serversPuppeteer or Playwright, or Gotenberg as a shared HTTP service
  • Static HTML from a Python app with print CSS and no browserWeasyPrint
  • Word, Excel and PowerPoint files converted to PDFGotenberg (LibreOffice) or Nutrient
  • Print-grade layout as a hosted service with SOC 2 and HIPAADocRaptor
  • Cheap hosted HTML to PDF at growing volumePDFShift
  • Templates that non-developers or your customers editPDF Generator API
  • Text, tables and structure extracted from incoming PDFsAdobe PDF Services API (PDF Extract)
  • Viewing, annotating and redacting documents inside your appPDF.js for viewing only; Apryse or Nutrient for editing

Rolling out a PDF service

A PDF renderer is quick to add and then runs for years. This sequence works with any of the tools above.

  1. Developer and product ownerList the documents, their inputs (HTML, data plus template, Office files) and monthly volume in documents and pages Week 1
  2. IT leadDecide where rendering may run: in-process library, internal container or vendor cloud, and which region customer data may reach Week 1
  3. DeveloperBuild one real template and compare output, render time and file size on two candidates Week 2
  4. IT leadCheck the license or plan against the volume: AGPL terms, revenue thresholds, credits per page or per MB Week 2
  5. AdminStore API keys or JWT secrets in your secrets manager, name an owner for each, and keep self-hosted renderers off the public internet Week 3
  6. DeveloperAdd monitoring for failed renders and usage alerts before the plan's credit limit Week 3

Security notes for PDF rendering

A renderer that loads HTML behaves like a browser on your server. If templates include customer-supplied text or URLs, escape everything, block requests to internal addresses and give the renderer no access to cloud metadata endpoints. The wkhtmltopdf project itself warns not to use it with untrusted HTML, and its QtWebKit engine has been unmaintained since 2016.

Hosted APIs move that risk to the vendor. However, they add another one: an API key or signing secret that can generate documents on your account. Keep it in a secrets manager, rotate it when people leave, and record who owns it. Our guide to secrets management software compares tools for storing those credentials.

What is the best free PDF library?

Puppeteer and Gotenberg render HTML to PDF for free with Chromium, WeasyPrint does it in Python without a browser, PDF.js views PDFs in the browser and PDFKit generates them in JavaScript. QuestPDF is free for organizations under $1 million in annual revenue.

Should I use a PDF library or a PDF API?

A library runs in your process with no per-document fee but makes you maintain the engine. A hosted API such as DocRaptor, PDFShift or PDF Generator API bills per document and handles scaling and updates, at the cost of sending data to the vendor.

Is iText free for commercial use?

Only under the AGPLv3, which requires you to publish your application's source code. Closed-source products need a commercial iText license, sold as an annual subscription priced by the number of PDFs processed or as an OEM license.

Is wkhtmltopdf still maintained?

No. Its GitHub repository is archived, the last release is 0.12.6 from June 2020, and the project's status page advises against using it with untrusted HTML. Gotenberg, Puppeteer and WeasyPrint are common replacements.

Which PDF API lets customers edit their own templates?

PDF Generator API embeds a white-label template editor in your application through an iframe. Customers edit their templates there, and your app fills them with JSON through the REST API.

The IT Lead

Know who owns every service account.

Import a CSV, nominate owners, collect attestations and keep a review trail an auditor can follow. No credit card required to create a workspace.

Cookie settings · Privacy policy · Imprint