Get your API key
Author

benoitded

Software Engineer at PDF4.dev

Software engineer and founder of PDF4.dev, building developer tools for PDF generation and document automation.

156 articles by benoitded

How we built a client-side PDF compressor (no uploads, text stays selectable)
Developer Guides

How we built a client-side PDF compressor (no uploads, text stays selectable)

Engineering deep-dive: recompressing images inside a PDF with pdf-lib, DecompressionStream, PNG predictors, and OffscreenCanvas workers, entirely in the browser.

How to generate a purchase order PDF (template + API)
Business Documents

How to generate a purchase order PDF (template + API)

Generate purchase order PDFs from an HTML template with dynamic line items, then render with a headless browser or a hosted API. Node.js and Python code.

How to add a digital signature to a PDF programmatically
PDF Security

How to add a digital signature to a PDF programmatically

Digitally sign a PDF in code: the difference between a visible signature image and a cryptographic PKCS#7 signature, with Node.js and Python libraries and an honest scope.

How to remove blank pages from a PDF (auto-detect, free)
PDF Manipulation

How to remove blank pages from a PDF (auto-detect, free)

Remove blank pages from a PDF automatically. Detect and delete empty pages in your browser, with Python (pypdf), or Node.js (pdf-lib and pdf.js), no upload.

How to render right-to-left (Arabic, Hebrew) text in PDF
Developer Guides

How to render right-to-left (Arabic, Hebrew) text in PDF

Render Arabic, Hebrew, and Persian text correctly in HTML to PDF: set dir=rtl, load a font with the right glyphs, and let Chromium shape the bidi text.

How to generate a PDF from Google Forms responses
Use Cases

How to generate a PDF from Google Forms responses

Turn Google Forms submissions into PDFs automatically: an Apps Script on-submit trigger that maps responses to a template and renders a PDF, emailed or saved to Drive.

How to generate PDFs with Google Apps Script
Developer Guides

How to generate PDFs with Google Apps Script

Generate PDFs in Google Apps Script: the built-in getAs("application/pdf") for Docs and Sheets, HtmlService, or a hosted PDF4.dev API for full HTML and CSS control.

How to insert pages into a PDF (blank page or from another file)
PDF Manipulation

How to insert pages into a PDF (blank page or from another file)

Insert pages into a PDF at any position: add a blank page or copy pages from another file. Browser, Python (pypdf), Node.js (pdf-lib), and CLI methods.

How to add a table of contents to a PDF
Developer Guides

How to add a table of contents to a PDF

Add a clickable table of contents and PDF bookmarks: build it from HTML anchors when converting with Chromium, or add outline entries to an existing PDF with pdf-lib.

PDF generation in Elixir: ChromicPDF, Phoenix, and a PDF API compared
Developer Guides

PDF generation in Elixir: ChromicPDF, Phoenix, and a PDF API compared

Generate PDFs in Elixir and Phoenix: ChromicPDF for HTML to PDF via headless Chromium, pdf_generator, Gutenex, and a hosted PDF4.dev API, with code and tradeoffs.

PDF generation in Supabase Edge Functions
Developer Guides

PDF generation in Supabase Edge Functions

Generate PDFs from Supabase Edge Functions: why the Deno runtime has no Chromium, using pdf-lib or jsPDF, or calling a hosted PDF4.dev API for HTML to PDF.

Dompdf vs mPDF: PHP HTML to PDF compared (2026)
Comparisons

Dompdf vs mPDF: PHP HTML to PDF compared (2026)

Dompdf and mPDF both turn HTML into PDF in pure PHP. CSS support, fonts, tables, performance and which one to pick, plus when a browser engine wins.

PDF generation on Vercel Functions: what works and what does not
Developer Guides

PDF generation on Vercel Functions: what works and what does not

Generate PDFs on Vercel: serverless functions with Playwright and @sparticuz/chromium, why the Edge runtime cannot, plus a hosted PDF4.dev API that needs no browser.

How to generate multilingual PDFs from HTML (Chinese, Arabic, RTL, emoji)
Developer Guides

How to generate multilingual PDFs from HTML (Chinese, Arabic, RTL, emoji)

Render Chinese, Japanese, Korean, Arabic, Hebrew, RTL text, and color emoji in HTML-to-PDF. Fix tofu boxes with the right fonts, unicode-range, and dir attributes.

How to generate PDFs from Cursor with an MCP server
AI & PDF

How to generate PDFs from Cursor with an MCP server

Wire PDF4.dev into Cursor over MCP so the AI editor can create templates and render PDFs from your codebase. One-click config, the tools exposed, and a real workflow.

How to mix portrait and landscape pages in one PDF (CSS and merge)
Developer Guides

How to mix portrait and landscape pages in one PDF (CSS and merge)

Mix portrait and landscape pages in one PDF with CSS named pages and preferCSSPageSize, or render each section and merge with pdf-lib. Copy-paste code included.

PDF generation on AWS Lambda: Chromium, layers, and the alternatives
Developer Guides

PDF generation on AWS Lambda: Chromium, layers, and the alternatives

Generate PDFs on AWS Lambda: Playwright or Puppeteer with @sparticuz/chromium, the size and cold-start limits, plus a hosted PDF4.dev API that needs no Chromium.

How to add a barcode to a PDF (Code 128, EAN-13, from HTML)
Developer Guides

How to add a barcode to a PDF (Code 128, EAN-13, from HTML)

Add a barcode to a PDF from HTML using Node.js, Python, or PHP. Render it as a base64 data URI or inline SVG so it scans, with copy-paste code.

ReportLab vs WeasyPrint: Python PDF generation compared (2026)
Comparisons

ReportLab vs WeasyPrint: Python PDF generation compared (2026)

ReportLab draws PDFs with code, WeasyPrint renders HTML and CSS to PDF. API style, CSS support, fonts, charts and when to choose each in Python.

PDF generation in Ruby: Prawn, Grover, and a PDF API compared
Developer Guides

PDF generation in Ruby: Prawn, Grover, and a PDF API compared

Generate PDFs in Ruby: Prawn for drawing, Grover or WickedPDF for HTML to PDF via a browser, plus a hosted PDF4.dev API. With code for each and honest tradeoffs.

How to generate a PDF from JSON data
Developer Guides

How to generate a PDF from JSON data

Turn JSON into a PDF: bind the data to an HTML and Handlebars template, then render with a browser engine or a hosted PDF4.dev API. Arrays, totals and nested objects.

How to convert CSV to PDF (Python, Node.js, or API)
PDF Conversion

How to convert CSV to PDF (Python, Node.js, or API)

Convert CSV to PDF by mapping rows to an HTML table, then rendering with a browser engine. Python and Node.js code, formatting tips, and a hosted API path.

PDF generation in Fastify: every working option in 2026
Developer Guides

PDF generation in Fastify: every working option in 2026

Generate PDFs in Fastify: a route returning Playwright or Puppeteer output, pdfkit for drawing, plus a hosted PDF4.dev API. With reply headers and a warm browser.

PDF/A explained: conformance levels, requirements, and how to create archival PDFs (2026 guide)
Developer Guides

PDF/A explained: conformance levels, requirements, and how to create archival PDFs (2026 guide)

PDF/A is ISO 19005, the archival PDF standard. Compare PDF/A-1, A-2, A-3, and A-4, see what each level requires, and convert and validate PDFs yourself.

Gotenberg vs Playwright for HTML to PDF (2026)
Comparisons

Gotenberg vs Playwright for HTML to PDF (2026)

Gotenberg is a Dockerized PDF API you self-host, Playwright is a browser-automation library you embed. Setup, fidelity, scaling and when each one fits.

Batch PDF generation at scale: concurrency, queues, and memory (Node.js guide)
Developer Guides

Batch PDF generation at scale: concurrency, queues, and memory (Node.js guide)

Generate 10,000 PDFs without crashing your server. Concurrency limits, queue patterns, memory budgets, retries, and ZIP delivery for batch PDF generation in Node.js.

PDF generation in NestJS: every working option in 2026
Developer Guides

PDF generation in NestJS: every working option in 2026

Generate PDFs in NestJS: a controller streaming Playwright or Puppeteer output, pdfkit for drawing, plus a hosted PDF4.dev API with no Chromium to manage.

How to connect Claude to a PDF generation API
AI & PDF

How to connect Claude to a PDF generation API

Give Claude the ability to generate PDFs: connect it to PDF4.dev over MCP, or call the REST API from a tool definition, so the model creates real documents.

How to convert PowerPoint to PDF (LibreOffice, Python, Node.js, and API)
PDF Conversion

How to convert PowerPoint to PDF (LibreOffice, Python, Node.js, and API)

Convert PPTX to PDF for free with PowerPoint, LibreOffice CLI, Python, or Node.js. Fix missing fonts, notes pages, and slide sizing, plus batch conversion.

PDF generation in Electron: printToPDF and the alternatives
Developer Guides

PDF generation in Electron: printToPDF and the alternatives

Generate PDFs in an Electron app: the built-in webContents.printToPDF (no dependency), Puppeteer, or a hosted PDF4.dev API for server-side rendering.

How to convert Excel to PDF (LibreOffice, Python, Node.js, and API)
PDF Conversion

How to convert Excel to PDF (LibreOffice, Python, Node.js, and API)

Convert XLSX to PDF for free with Excel, LibreOffice CLI, Python, or Node.js. Fix fit-to-page scaling, print areas, and cut-off columns, plus batch conversion.

How to generate PDFs from Notion pages and databases
Use Cases

How to generate PDFs from Notion pages and databases

Turn Notion pages and database rows into PDFs: a script via the Notion API, a no-code n8n flow, or a template render, each producing a styled PDF.

PDF generation in Symfony: every working option in 2026
Developer Guides

PDF generation in Symfony: every working option in 2026

Generate PDFs in Symfony: KnpSnappyBundle with wkhtmltopdf, Dompdf and mPDF for HTML to PDF, Gotenberg for Chromium, plus a hosted PDF4.dev API.

How to convert PDF to Markdown (Python, Node.js, and for LLM/RAG pipelines)
PDF Conversion

How to convert PDF to Markdown (Python, Node.js, and for LLM/RAG pipelines)

Convert PDF to Markdown with MarkItDown, Marker, and Docling in Python, pdfjs-dist in Node.js, plus how to clean output for LLM and RAG ingestion.

How to fill a PDF form programmatically
Developer Guides

How to fill a PDF form programmatically

Fill AcroForm PDF fields in code with pdf-lib (text fields, checkboxes, dropdowns, radio groups), flatten the result, or generate a filled PDF from HTML instead.

PDF font embedding and subsetting explained (fix missing fonts, shrink file size)
Developer Guides

PDF font embedding and subsetting explained (fix missing fonts, shrink file size)

How PDF font embedding and subsetting work: why fonts go missing, how subsetting cuts file size, the standard 14 fonts, and how to check what is embedded.

Generate PDF from HTML in Java: openhtmltopdf, Flying Saucer, and a PDF API
Developer Guides

Generate PDF from HTML in Java: openhtmltopdf, Flying Saucer, and a PDF API

Generate PDFs from HTML in Java: openhtmltopdf and Flying Saucer for XHTML to PDF, Playwright for Java for full Chromium fidelity, plus a hosted PDF4.dev API.

PDF generation in Hono: every working option by runtime (2026)
Developer Guides

PDF generation in Hono: every working option by runtime (2026)

Generate PDFs in a Hono app across every runtime: Playwright on Node and Bun, pdf-lib on Cloudflare Workers, or a hosted PDF4.dev API with no browser.

PDFKit vs pdf-lib: which Node.js PDF library should you use in 2026
Comparisons

PDFKit vs pdf-lib: which Node.js PDF library should you use in 2026

PDFKit draws new PDFs from a stream, pdf-lib creates and edits existing PDFs. Features, editing support, fonts, bundle size and when to pick each in Node.js.

How to convert PDF to CSV (free, and programmatic with Python and Node.js)
PDF Conversion

How to convert PDF to CSV (free, and programmatic with Python and Node.js)

Convert PDF tables to CSV: free browser method, Python with Camelot and pdfplumber, Node.js with pdfjs-dist, and how to handle scanned PDFs with OCR.

PDF generation in Rust: every working option in 2026
Developer Guides

PDF generation in Rust: every working option in 2026

Generate PDFs in Rust: printpdf and genpdf for drawing, headless_chrome or chromiumoxide for HTML to PDF, plus a hosted PDF4.dev API over reqwest.

Open source PDF to Word converters: 5 tools tested (2026)
Comparisons

Open source PDF to Word converters: 5 tools tested (2026)

Convert PDF to Word with open source tools: LibreOffice, pdf2docx, Calibre, and poppler compared on layout fidelity, tables, batch use, and licenses.

Convert PDF to Word in Python: pdf2docx from install to batch (2026)
Developer Guides

Convert PDF to Word in Python: pdf2docx from install to batch (2026)

Convert PDF to DOCX in Python with pdf2docx: Converter API, convert(start, end, pages), multiprocessing, tables, plus LibreOffice and OCR for scans.

WeasyPrint vs Prince: CSS to PDF engines compared (2026)
Comparisons

WeasyPrint vs Prince: CSS to PDF engines compared (2026)

WeasyPrint is free and open source, Prince is commercial with deeper CSS print support. A side-by-side of CSS coverage, price, output quality and when each wins.

PDF generation in Nuxt: every working option in 2026
Developer Guides

PDF generation in Nuxt: every working option in 2026

Generate PDFs in Nuxt with a Nitro server route: Playwright or Puppeteer for HTML to PDF, jsPDF on the client, or a hosted PDF4.dev API with no Chromium to ship.

PDF generation in Remix: every working option in 2026
Developer Guides

PDF generation in Remix: every working option in 2026

Generate PDFs in Remix: resource routes with Playwright or Puppeteer for HTML to PDF, jsPDF on the client, plus a hosted PDF4.dev API with no Chromium to ship.

PDF generation in Astro: every working option in 2026
Developer Guides

PDF generation in Astro: every working option in 2026

Generate PDFs in Astro: server endpoints with Playwright or Puppeteer for HTML to PDF, client-side jsPDF, plus a hosted PDF4.dev API with no Chromium to ship.

LibreOffice headless PDF conversion: soffice --convert-to, explained
Developer Guides

LibreOffice headless PDF conversion: soffice --convert-to, explained

Automate PDF conversion with soffice --headless --convert-to: DOCX to PDF, PDF to Word, images to PDF, batch folders, parallel profiles, and Docker.

How to embed images in HTML to PDF (fix missing images, base64 vs URL)
Developer Guides

How to embed images in HTML to PDF (fix missing images, base64 vs URL)

Why images go missing in HTML to PDF and how to fix them: base64 data URIs, absolute URLs, waiting for load, printBackground, and CORS, with working code.

PDF generation in Flask: WeasyPrint, Playwright, and a PDF API compared
Developer Guides

PDF generation in Flask: WeasyPrint, Playwright, and a PDF API compared

Generate PDFs in Flask: WeasyPrint and xhtml2pdf for HTML to PDF, ReportLab for drawing, Playwright for full Chromium fidelity, plus a hosted PDF4.dev API.

Best PDFShift alternatives in 2026: 5 options compared
Comparisons

Best PDFShift alternatives in 2026: 5 options compared

Looking for a PDFShift alternative? PDF4.dev, Doppio, APITemplate, DocRaptor, and Gotenberg compared on pricing model, templates, free tier, and API design.

PDF generation in Docker: Playwright, Chromium, and a lean image (2026)
Developer Guides

PDF generation in Docker: Playwright, Chromium, and a lean image (2026)

How to generate PDFs in Docker with Playwright or Puppeteer. Dockerfile, system dependencies, fonts, image size, zombie processes, and when to skip Chromium.

How to OCR a PDF and make scanned pages searchable (2026 guide)
Developer Guides

How to OCR a PDF and make scanned pages searchable (2026 guide)

OCR a PDF to make scanned pages searchable: detect image-only pages, run OCRmyPDF or Tesseract, tune DPI and language packs, and batch process a whole folder.

How to generate PDFs from Airtable records
Use Cases

How to generate PDFs from Airtable records

Turn Airtable records into PDFs: a script via the Airtable API, an automation script action, or a no-code n8n flow, each rendering a template to PDF.

How to add Bates numbering to a PDF (free, programmatic)
PDF Manipulation

How to add Bates numbering to a PDF (free, programmatic)

Add Bates numbering to a PDF: stamp sequential legal page identifiers with a prefix, fixed digit count, and start value using pdf-lib in Node.js, step by step.

PDF generation in Angular: every working option in 2026
Developer Guides

PDF generation in Angular: every working option in 2026

Generate PDFs in Angular: jsPDF and pdfmake on the client, html2canvas for DOM capture, a server endpoint with Playwright, plus a hosted PDF4.dev API.

jsPDF vs pdfmake: client-side PDF generation compared (2026)
Comparisons

jsPDF vs pdfmake: client-side PDF generation compared (2026)

jsPDF draws PDFs imperatively, pdfmake builds them from a declarative document definition. Features, tables, fonts, bundle size and when to pick each.

PDF generation in SvelteKit: every working option in 2026
Developer Guides

PDF generation in SvelteKit: every working option in 2026

Generate PDFs in SvelteKit: server endpoints with Playwright or Puppeteer for HTML to PDF, jsPDF on the client, plus a hosted PDF4.dev API.

Using LLMs to generate PDF templates from a prompt
AI & PDF

Using LLMs to generate PDF templates from a prompt

Turn a plain-language prompt into a reusable HTML and Handlebars PDF template with an LLM, then render it to PDF on demand. Patterns, prompts and guardrails.

PDF generation in Deno: every working option in 2026
Developer Guides

PDF generation in Deno: every working option in 2026

Generate PDFs in Deno: Playwright and Puppeteer via npm specifiers for HTML to PDF, jsPDF and pdf-lib for drawing, plus a hosted PDF4.dev API.

pdf-lib vs pdf.js: which JavaScript PDF library should you use in 2026
Comparisons

pdf-lib vs pdf.js: which JavaScript PDF library should you use in 2026

pdf-lib writes and edits PDFs, pdf.js reads and renders them. A side-by-side of features, bundle size, and the tasks each one is built for.

PDF generation in Express.js: every working option in 2026
Developer Guides

PDF generation in Express.js: every working option in 2026

Generate PDFs in an Express.js app: Puppeteer and Playwright for HTML to PDF, pdfkit for drawing, plus a hosted PDF4.dev API with no browser to manage.

Puppeteer vs WeasyPrint: HTML to PDF compared (2026)
Comparisons

Puppeteer vs WeasyPrint: HTML to PDF compared (2026)

Puppeteer vs WeasyPrint for HTML to PDF: Node.js Chromium versus Python CSS rendering, with real benchmark numbers, JavaScript support, and CSS coverage.

PDF generation in Vue and Nuxt: every working option in 2026
Developer Guides

PDF generation in Vue and Nuxt: every working option in 2026

Generate PDFs in Vue and Nuxt in 2026: client-side jsPDF, server-side Playwright in Nitro routes, and a hosted HTML-to-PDF API, with the tradeoffs.

PDF generation in Bun: every working option in 2026
Developer Guides

PDF generation in Bun: every working option in 2026

How to generate PDFs in Bun in 2026: Puppeteer support, why Playwright is unofficial, pure-JS libraries with no browser, and the hosted API escape hatch.

How to extract images from a PDF (free online and programmatic methods)
PDF Manipulation

How to extract images from a PDF (free online and programmatic methods)

Extract embedded images from any PDF, free online or with Python and JavaScript. Pull out JPEGs and PNGs at full quality, or render pages to images.

PDF generation in FastAPI: WeasyPrint, Playwright, and a PDF API compared
Developer Guides

PDF generation in FastAPI: WeasyPrint, Playwright, and a PDF API compared

Generate PDFs in FastAPI: render a Jinja2 template, convert with WeasyPrint or async Playwright, or call a PDF API. Full async code, comparison table, tips.

Developer Guides

PDF generation in Django: WeasyPrint, Playwright, and a PDF API compared

Generate PDFs in Django: render a template, convert with WeasyPrint or Playwright, or call a PDF API from a view. Complete code, comparison, tips.

PDF color spaces: RGB vs CMYK for screen and print
Developer Guides

PDF color spaces: RGB vs CMYK for screen and print

HTML to PDF renders in RGB, but offset print shops want CMYK. Learn the difference, when each matters, and how to convert a PDF to CMYK with Ghostscript.

Developer Guides

PDF generation in .NET and C#: QuestPDF, Playwright, and PDF APIs compared

Generate PDFs in .NET and C# with QuestPDF, Playwright for .NET, PuppeteerSharp, or a REST API. Real ASP.NET Core code, an options table, and production tips.

wkhtmltopdf alternatives in 2026: the migration guide
Comparisons

wkhtmltopdf alternatives in 2026: the migration guide

wkhtmltopdf is archived and unmaintained. Compare the best 2026 alternatives (Playwright, Puppeteer, WeasyPrint, Gotenberg) and pick a safe migration path.

How to add a QR code to a PDF (HTML to PDF, with code)
Developer Guides

How to add a QR code to a PDF (HTML to PDF, with code)

Add a QR code to a PDF from HTML using Node.js, Python, or PHP. Embed it as a base64 data URI or inline SVG so it always renders, with copy-paste code.

Comparisons

Puppeteer vs wkhtmltopdf: which to use in 2026

Puppeteer vs wkhtmltopdf for HTML to PDF: rendering engine, CSS and JS support, deployment, and why wkhtmltopdf is now deprecated.

How to add charts and graphs to a PDF with Chart.js (server-side, 2026)
Developer Guides

How to add charts and graphs to a PDF with Chart.js (server-side, 2026)

Add charts to a PDF with Chart.js using headless Chromium. Why JavaScript chart libraries fail in WeasyPrint and wkhtmltopdf, with working Node.js code.

How to add clickable links to a PDF generated from HTML
Developer Guides

How to add clickable links to a PDF generated from HTML

Clickable links work automatically when you convert HTML to PDF with Chromium. Add external links, internal anchors, a table of contents and bookmarks.

Comparisons

WeasyPrint vs wkhtmltopdf: which HTML to PDF engine to pick in 2026

WeasyPrint vs wkhtmltopdf compared: wkhtmltopdf is archived since 2023, WeasyPrint is actively maintained pure Python. Which to use and how to migrate.

PDF paper sizes guide: A4, Letter, Legal dimensions in points, mm, inches and pixels
Developer Guides

PDF paper sizes guide: A4, Letter, Legal dimensions in points, mm, inches and pixels

PDF page size reference: A4, Letter, Legal and full A-series dimensions in points, mm, inches and pixels, plus how to set the page size in HTML to PDF.

Generating accessible tagged PDFs from HTML: WCAG 2.2 and PDF/UA-2
Developer GuidesPillar

Generating accessible tagged PDFs from HTML: WCAG 2.2 and PDF/UA-2

Developer guide to producing WCAG 2.2 and PDF/UA-2 compliant tagged PDFs from HTML for the European Accessibility Act, with veraPDF in CI and audit-passing patterns.

Build a Stripe PDF invoice generator with webhooks (working repo)
Use Cases

Build a Stripe PDF invoice generator with webhooks (working repo)

Build a custom Stripe PDF invoice flow with webhooks: Stripe payment.succeeded → render branded PDF via PDF4.dev → email link. Full working repo, 80 lines.

HTML to PDF benchmark Q3 2026: refreshed numbers, new contenders
Developer Guides

HTML to PDF benchmark Q3 2026: refreshed numbers, new contenders

Refreshed HTML to PDF benchmark for Q3 2026: Playwright, Puppeteer, chrome-headless-shell, WeasyPrint, Gotenberg, PDF4.dev. Cold start, warm pool, RAM.

Generate fillable PDF forms from HTML: AcroForm, pdf-lib, and the API
PDF Manipulation

Generate fillable PDF forms from HTML: AcroForm, pdf-lib, and the API

HTML forms do not auto-become PDF forms when you print. Here are the three working paths to ship interactive, fillable PDFs from a code-first workflow.

Best PDFMonkey alternatives in 2026: honest comparison
Comparisons

Best PDFMonkey alternatives in 2026: honest comparison

Looking for a PDFMonkey alternative? Side-by-side of Doppio, APITemplate, CraftMyPDF, DocRaptor, PDF4.dev. Pricing, templates, API, free tier.

PDF generation on Cloudflare Workers: every option in 2026
Developer Guides

PDF generation on Cloudflare Workers: every option in 2026

PDF generation on Cloudflare Workers in 2026: why workerd cannot run Chromium, when Browser Rendering wins, WASM alternatives, and the API escape hatch.

ChatGPT vs Claude vs Gemini vs Perplexity for PDFs: 2026 benchmark
Comparisons

ChatGPT vs Claude vs Gemini vs Perplexity for PDFs: 2026 benchmark

Side-by-side benchmark of ChatGPT, Claude, Gemini, and Perplexity reading the same 50-page PDF. Cost, latency, citation accuracy, file-size caps.

PDF generation in Rails: every option compared in 2026
Developer Guides

PDF generation in Rails: every option compared in 2026

PDF generation in Ruby on Rails in 2026: WickedPdf, Grover, Ferrum PDF, ChromicPDF wrappers, Prawn, hosted APIs. Pick the right one for invoices and reports.

Rendering 100 invoices in 2k tokens with code execution and MCP
AI & PDF

Rendering 100 invoices in 2k tokens with code execution and MCP

Applying Anthropic's code-execution-with-MCP pattern to PDF4.dev for batch document generation. The architecture, the token math, the security model, and concrete TypeScript code.

Best PDF-to-Word converters 2026: tested on real documents
Comparisons

Best PDF-to-Word converters 2026: tested on real documents

Side-by-side test of the best PDF-to-Word converters in 2026: Adobe, LibreOffice, pdf2docx, ABBYY, Google Docs. Accuracy, cost, batch automation.

Playwright headerTemplate and footerTemplate: fixing displayHeaderFooter PDFs
Developer Guides

Playwright headerTemplate and footerTemplate: fixing displayHeaderFooter PDFs

How page.pdf() headerTemplate and footerTemplate actually work: 4 documented footguns fixed, plus a DOM trick for complex header and footer layouts.

react-pdf vs Playwright: which one for PDF generation in 2026?
Comparisons

react-pdf vs Playwright: which one for PDF generation in 2026?

react-pdf vs Playwright for PDF: when to use each, what react-pdf can't do, why most React teams switch to HTML to PDF for production.

PDF generation in Laravel: every option compared in 2026
Developer Guides

PDF generation in Laravel: every option compared in 2026

PDF generation in Laravel: Spatie Browsershot, DomPDF, Snappy, hosted APIs. Pick the right one for invoices, reports, and high-volume rendering.

How to convert PDF to Excel (free, programmatic, accurate)
PDF Conversion

How to convert PDF to Excel (free, programmatic, accurate)

How to convert PDF tables to Excel: best free tools, when client-side extraction works, when you need OCR, and how to automate it from Node.js or Python.

PDF generation in Spring Boot: every option compared in 2026
Developer Guides

PDF generation in Spring Boot: every option compared in 2026

PDF generation in Spring Boot: OpenPDF, iText, OpenHTMLToPDF, Playwright sidecar, hosted APIs. Pick the right one for invoices, reports, and high volume.

How we hardened our SSE stream for Railway and Next.js App Router
Developer Guides

How we hardened our SSE stream for Railway and Next.js App Router

Real-time dashboard sync looked trivial on localhost. In production we hit Railway's 5-minute HTTP cap, a known Next.js App Router ResponseAborted crash, and EventEmitter leak warnings. Here is the exact code we ship to handle all three.

How we built an MCP server for PDF generation
AI & PDF

How we built an MCP server for PDF generation

Inside PDF4.dev's MCP server: 14 tools, 4 resources, 3 prompts, outputSchema everywhere, structured errors, and the SSOT that keeps llms.txt and the docs site in sync with the code.

Real-time dashboard sync
Developer Guides

Real-time dashboard sync

pdf4.dev now updates every open dashboard tab the moment an AI agent or an API call writes a template, a component, or a PDF render log. Inside the architecture: SSE, an in-process EventEmitter bus, and the Railway and Next.js gotchas we had to work around.

How to convert SVG to PDF
PDF Conversion

How to convert SVG to PDF

Convert SVG to PDF without losing vector quality. Compares Inkscape, rsvg-convert, Playwright, and svg2pdf.js with code, font handling, and page-fit tips.

How to connect ChatGPT to a PDF API
AI & PDF

How to connect ChatGPT to a PDF API

Three ways to connect ChatGPT to a PDF generation API: Custom GPT actions, the experimental MCP server support, and the Assistants API with function calling. Full OpenAPI snippet, auth setup, and signed URL delivery.

How to automate PDF generation with Zapier and Make.com
Tutorials

How to automate PDF generation with Zapier and Make.com

Step-by-step no-code guide to automating PDF generation with Zapier and Make.com. Typeform to PDF receipt, email delivery, Google Drive storage, and a full Zapier vs Make comparison.

How to create a PDF certificate
Business Documents

How to create a PDF certificate

Design and generate PDF certificates for courses, events, and HR programs. Covers layout, seals, signature lines, QR verification, batch rendering from CSV, and localization.

Handlebars templates for PDF generation: the complete guide
Developer Guides

Handlebars templates for PDF generation: the complete guide

Learn how to use Handlebars as a PDF templating language. Variables, blocks, helpers, partials, escaping, and a full invoice example you can run today.

Can Claude generate PDFs? Yes, natively. When you still need an API
News

Can Claude generate PDFs? Yes, natively. When you still need an API

Yes, Claude can create PDFs natively since April 2026. What it handles well, where it fails (bulk, latency, pixel-perfect layout), and when a PDF API wins.

PDF generation best practices for production
Developer Guides

PDF generation best practices for production

An operational guide to running PDF generation at scale: caching, retries, timeouts, browser pool lifecycle, memory, observability, and cost. Real numbers from the PDF4.dev production stack.

How to convert a React component to PDF
PDF Conversion

How to convert a React component to PDF

Two ways to turn React components into PDFs: server-render JSX to HTML and print with Chromium, or use @react-pdf/renderer. Includes Tailwind, MUI, and benchmarks.

How to convert Markdown to PDF: the complete guide
PDF Conversion

How to convert Markdown to PDF: the complete guide

Convert Markdown to PDF five ways: Pandoc with LaTeX, marked plus Playwright, markdown-it plus Puppeteer, and a REST API. Covers GFM, math, mermaid, and page breaks.

How to watermark a PDF to prevent copying and unauthorized sharing
PDF Security

How to watermark a PDF to prevent copying and unauthorized sharing

Use per-recipient watermarks to deter PDF leaks, create legal evidence, and trace shared documents. Code examples, tile patterns, and DRM comparison.

PDF generation in serverless environments: AWS Lambda, Vercel, and Cloudflare
Developer Guides

PDF generation in serverless environments: AWS Lambda, Vercel, and Cloudflare

Why Playwright and serverless are a painful match. Cold starts, size limits, Cloudflare Workers, @sparticuz/chromium, and when to call an API instead.

How to add custom fonts to a PDF
Developer Guides

How to add custom fonts to a PDF

Embed custom fonts in HTML-to-PDF rendering with Playwright, Python, and PDF4.dev. Covers Google Fonts, self-hosting, FOUT, variable fonts, and CJK.

PDF encryption explained: RC4, AES-128, AES-256
PDF Security

PDF encryption explained: RC4, AES-128, AES-256

How PDF encryption works across RC4, AES-128, and AES-256, with the real security level of each version, known weaknesses, and which to use today.

PDF vs JPG: which format to choose
PDF Conversion

PDF vs JPG: which format to choose

PDF or JPG? A side-by-side comparison covering photos, documents, lossy vs lossless compression, file size, color, EXIF, and print workflows.

PDF vs PNG: when to use each format
PDF Conversion

PDF vs PNG: when to use each format

PDF or PNG? A practical comparison of the two formats covering documents, images, vector vs raster, file size, transparency, and archiving.

How to edit PDF metadata (title, author, keywords)
PDF Manipulation

How to edit PDF metadata (title, author, keywords)

Edit PDF metadata online for free, or automate it with pdf-lib, PyMuPDF, Ghostscript, and ExifTool. Covers document info dictionary and XMP metadata.

How to build a PDF certificate generator
Developer Guides

How to build a PDF certificate generator

Build a certificate generator with HTML templates, Google Fonts, and a single API call. Covers design, batch generation from CSV, watermarks, and security.

How to convert Word to PDF
PDF Conversion

How to convert Word to PDF

Convert DOCX to PDF for free using Microsoft Word, LibreOffice CLI, Python, Node.js, or Google Docs API. Includes batch conversion and formatting fixes.

How to repair a corrupted PDF
PDF Manipulation

How to repair a corrupted PDF

Repair a corrupted PDF online for free, or automate recovery with pdf-lib, PyMuPDF, Ghostscript, and qpdf. Covers xref rebuilding and common corruption causes.

Generate PDF from HTML in Go (2026): chromedp, Rod, or zero-Chromium API
Developer Guides

Generate PDF from HTML in Go (2026): chromedp, Rod, or zero-Chromium API

Generate PDFs from HTML in Golang with chromedp or Rod (full code), what +300 MB of Chromium does to your Docker image, and the zero-dependency API path.

How to resize PDF pages
PDF Manipulation

How to resize PDF pages

Resize PDF pages online for free, or automate it with pdf-lib, PyMuPDF, Ghostscript, and qpdf. Covers A4 to Letter conversion and custom dimensions.

How to prevent PDF editing (permissions, flattening, and watermarks)
PDF Security

How to prevent PDF editing (permissions, flattening, and watermarks)

Restrict editing, copying, and printing in any PDF using permissions passwords, flattening, and watermarks. Free tools and code examples included.

How to convert a PDF to grayscale
PDF Manipulation

How to convert a PDF to grayscale

Convert a PDF to grayscale online for free, or automate it with pdfjs + pdf-lib, PyMuPDF, Ghostscript, and ImageMagick. Covers color models and file size impact.

How to crop a PDF
PDF Manipulation

How to crop a PDF

Crop a PDF page online for free, or automate it with pdf-lib, PyMuPDF, Ghostscript, and qpdf. Covers CropBox vs MediaBox and batch cropping.

How to flatten a PDF (form fields, annotations, layers)
PDF Manipulation

How to flatten a PDF (form fields, annotations, layers)

Flatten a PDF in seconds: free online tool, no upload, plus pdf-lib, PyMuPDF, Ghostscript, and qpdf code examples for batch automation.

How to convert a webpage to PDF (free, no install)
PDF Conversion

How to convert a webpage to PDF (free, no install)

Convert any webpage to PDF using a free browser tool or automate with Playwright. Covers JavaScript pages, lazy loading, and bot-detection workarounds.

How to extract pages from a PDF (free, no upload required)
PDF Manipulation

How to extract pages from a PDF (free, no upload required)

Save specific pages from a PDF into a new file, free and in your browser. Covers browser tool, macOS, Python, Node.js, and command-line methods.

How we render PDFs in under 300ms
Developer Guides

How we render PDFs in under 300ms

Inside PDF4.dev's rendering pipeline. Singleton browser pool, Handlebars compilation cache, the thead/tfoot trick for repeating headers, and page number stamping via pdf-lib.

Why we built PDF tools that run in your browser
Developer Guides

Why we built PDF tools that run in your browser

PDF4.dev's 24 free tools process files entirely client-side using pdf-lib and pdfjs-dist. No upload, no server, no privacy risk. Here is how the architecture works.

AI document generation: complete guide for developers (2026)
AI & PDF

AI document generation: complete guide for developers (2026)

AI document generation lets you create PDFs, invoices, and reports from natural language prompts. Full guide covering MCP, LLM workflows, and production APIs.

How to redact a PDF permanently (and why highlighting isn't enough)
PDF Security

How to redact a PDF permanently (and why highlighting isn't enough)

Learn how to permanently redact sensitive text and images in PDFs. Covers free browser tools, Python scripts, and why simple highlighting fails security audits.

How to generate a PDF from Google Sheets (4 methods)
Tutorials

How to generate a PDF from Google Sheets (4 methods)

Export Google Sheets data to PDF automatically: built-in export, Apps Script automation, Zapier/Make no-code workflows, and API-based generation for production use.

How to delete pages from a PDF (free, fast, no upload required)
PDF Manipulation

How to delete pages from a PDF (free, fast, no upload required)

Delete pages from a PDF in seconds, free and without uploading files. Browser-based tool, Python script, Node.js API, and command-line methods covered.

How to add page numbers to a PDF (free, online, no install)
PDF Manipulation

How to add page numbers to a PDF (free, online, no install)

Add page numbers to any PDF in seconds. Free online tool, no upload required. Also covers programmatic methods using Python, Node.js, and pdf-lib.

How to reorder PDF pages (free online and programmatic methods)
PDF Manipulation

How to reorder PDF pages (free online and programmatic methods)

Rearrange PDF pages in any order, free and in your browser, or automate page reordering with JavaScript, Python, and pdf-lib. No upload needed.

How to extract text from a PDF (free online and programmatic methods)
PDF Manipulation

How to extract text from a PDF (free online and programmatic methods)

Extract text from any PDF in seconds, free and online, or automate it with JavaScript, Python, and the PDF.js API. No signup required for the free tool.

AI invoice generator: build one with Claude and PDF4.dev in 10 minutes
AI & PDF

AI invoice generator: build one with Claude and PDF4.dev in 10 minutes

Generate professional PDF invoices with AI using Claude and PDF4.dev. Full tutorial with Node.js code, Handlebars templates, and MCP integration examples.

How to convert HTML to PDF: complete guide (2026)
PDF Conversion

How to convert HTML to PDF: complete guide (2026)

Convert HTML to PDF online, in the browser, or via API. Free tool, browser printing, Node.js, Python, PHP, and REST API methods compared.

PDF generation in Next.js: a complete guide for App Router
Developer Guides

PDF generation in Next.js: a complete guide for App Router

Generate PDFs in Next.js 14+ App Router using server actions, API routes, and Playwright. Includes React-to-PDF, dynamic templates, and PDF4.dev API examples.

Generate PDFs from HTML in PHP: Dompdf, Playwright, and REST APIs compared
Developer Guides

Generate PDFs from HTML in PHP: Dompdf, Playwright, and REST APIs compared

Generate PDFs from HTML in PHP using Dompdf, headless Chromium, or a REST API. Covers Laravel, Symfony, dynamic templates, fonts, and production tips.

What is the Model Context Protocol (MCP) and how to use it for PDF generation
AI & PDFPillar

What is the Model Context Protocol (MCP) and how to use it for PDF generation

MCP lets AI agents call external tools directly. Learn what MCP is, how the protocol works, and how to connect Claude, ChatGPT, Cursor, or VS Code to a PDF API in under 3 minutes.

Generate PDFs from HTML in Python: WeasyPrint, Playwright, and PDF APIs compared
Developer Guides

Generate PDFs from HTML in Python: WeasyPrint, Playwright, and PDF APIs compared

Generate PDFs from HTML in Python using WeasyPrint, Playwright, or a REST API. Covers Flask, FastAPI, dynamic templates, fonts, and production tips.

How to add a watermark to a PDF (free, no upload needed)
PDF Manipulation

How to add a watermark to a PDF (free, no upload needed)

Add text watermarks to any PDF for free in your browser. Interactive designer, code examples with pdf-lib and Python, plus API automation.

How to remove a password from a PDF (free, no Adobe needed)
PDF Security

How to remove a password from a PDF (free, no Adobe needed)

Remove a PDF password instantly in your browser or with qpdf on the command line. Files stay on your device. Works on Mac, Windows, and mobile.

How to compress PDF for email (under 10 MB in seconds)
PDF Manipulation

How to compress PDF for email (under 10 MB in seconds)

Compress a PDF for email in seconds with no quality loss. Covers email size limits, free browser tools, Ghostscript, and Python one-liners. 2026 guide.

CSS print styles: the complete guide for PDF generation
Developer Guides

CSS print styles: the complete guide for PDF generation

Master @media print, @page margins, page breaks, widows/orphans, and table headers. Interactive demos show each CSS property in action.

How to convert PDF to Word without losing formatting: 5 free methods (2026)
PDF Conversion

How to convert PDF to Word without losing formatting: 5 free methods (2026)

Convert PDF to editable DOCX free with Microsoft Word, Google Docs, LibreOffice, or Python pdf2docx. Which method keeps layout, tables, and equations intact.

Complete guide to PDF conversion: every format, every method (2026)
PDF ConversionPillar

Complete guide to PDF conversion: every format, every method (2026)

PDF conversion explained: convert PDF to JPG, PNG, Word, HTML and more. Covers free browser tools, Python, Node.js, and command-line methods. Updated 2026.

How to convert images to PDF (free, no upload needed)
Tutorials

How to convert images to PDF (free, no upload needed)

Turn JPG, PNG, or multiple images into a single PDF in seconds. Free browser-based tool, no sign-up, files never leave your device.

How to rotate PDF pages (free, no software needed)
PDF Manipulation

How to rotate PDF pages (free, no software needed)

Rotate one or all PDF pages permanently for free. Browser tool, macOS Preview, command line, and code options. Files stay on your device.

How to generate PDF invoices programmatically
Business Documents

How to generate PDF invoices programmatically

Build automated invoice generation with HTML templates, dynamic data, and a single API call. Covers design, multi-language code examples, compliance, and scaling.

How to password protect a PDF (free, no Adobe needed)
PDF Security

How to password protect a PDF (free, no Adobe needed)

Add a password to any PDF in seconds using free browser-based tools, Adobe Acrobat, or the command line. Files never leave your device.

How to convert PDF to JPG (free, high quality)
PDF Conversion

How to convert PDF to JPG (free, high quality)

Convert PDF to JPG online for free without uploading files. Also covers Python, Node.js, and command line methods with JPEG quality and DPI tips.

Design PDFs with Claude, no code, just conversation
AI & PDF

Design PDFs with Claude, no code, just conversation

Use Claude + PDF4.dev MCP to design invoices, certificates, and reports through natural language. A complete walkthrough from blank page to production-ready PDF.

How to generate PDFs with AI agents using MCP
AI & PDF

How to generate PDFs with AI agents using MCP

Connect Claude, ChatGPT, Cursor, or any AI agent to PDF4.dev via MCP and generate PDFs with natural language. Step-by-step setup guide with examples.

Generate PDFs from HTML templates with Node.js
Developer Guides

Generate PDFs from HTML templates with Node.js

Build a Node.js PDF generator using Handlebars templates and Playwright. Covers dynamic data, styling, fonts, Docker, and when a PDF API makes more sense.

How to convert PDF to PNG (high quality, free)
PDF Conversion

How to convert PDF to PNG (high quality, free)

Convert PDF pages to high-resolution PNG images online, with Python, Node.js, or command line. Includes DPI tips for print-ready output.

How to compress PDF files without losing quality
PDF Manipulation

How to compress PDF files without losing quality

Reduce PDF file size by up to 80% while maintaining readable quality. Learn how PDF compression works and the best free methods to shrink your files.

How to split a PDF into individual pages (or custom ranges)
PDF Manipulation

How to split a PDF into individual pages (or custom ranges)

Split any PDF into individual pages or custom page ranges for free, in your browser, from the command line, or via API. No upload required.

How to merge PDF files: 5 free methods
PDF Manipulation

How to merge PDF files: 5 free methods

Merge multiple PDF files into one document for free. Compare 5 methods including browser-based tools, command-line, and programmatic approaches.

The complete guide to PDF manipulation: merge, split, compress, and more
PDF ManipulationPillar

The complete guide to PDF manipulation: merge, split, compress, and more

Learn how to merge, split, compress, rotate, reorder, and watermark PDF files. A comprehensive guide covering every PDF manipulation technique with free tools.