Blog
Notes from the document layer
Practical guides to generating PDFs, processing documents, and building with REST, SDK, CLI, and MCP.
Guides
22 articles
Generate PDFs in Bulk with Queues, Retries, and Webhooks
Run a resumable PDF batch with bounded concurrency, stable idempotency keys, durable progress, signed webhooks, and local output storage.
Extract Invoice Data from PDFs into Validated JSON
Build an invoice extraction pipeline with line-item checks, nullable identifiers, decimal arithmetic, and an explicit review path.
Generate PDFs in C# and ASP.NET Core
Build an ASP.NET Core PDF download endpoint with the official C# SDK, HTML templates, cancellation, and server-side error handling.
Generate PDFs in Java and Spring Boot
Generate an invoice PDF in Spring Boot with Thymeleaf and the official Java SDK, including a complete Maven project and download endpoint.
Make Scanned PDFs Searchable with OCR
Add a searchable text layer to scanned PDFs, verify the output, and compare clean and degraded scans using downloadable test files.
Extract PDF Tables into CSV with Python
Recover logical table rows from PDFs, validate missing and duplicate rows, and write CSV safely with a reproducible Python example.
Extract Structured JSON from PDFs in Python
Extract PDF fields into JSON with Python, validate the result against a schema, and check page coverage before importing data.
Reduce PDF File Size: What Compression Can Actually Change
Compare lossless PDF compression on text documents, scans, and image-heavy files with measured sizes and downloadable before-and-after PDFs.
Test PDF Generation in CI: Layout, Text, and Page Counts
Catch PDF regressions with searchable-text assertions, page-count checks, and rendered-page comparisons using a runnable test project.
HTML-to-PDF APIs Compared: Engines and Tradeoffs
Compare HTML-to-PDF services by rendering engine, supported inputs, and operational fit without invented performance scores.
Convert Authenticated Webpages to PDF
Plan PDF generation for pages behind login while keeping credentials on the server.
Generate PDFs Asynchronously with Jobs and Webhooks
Submit an async document job, persist its ID, verify signed notifications, and save the completed file.
Generate PDFs from JSON with Handlebars Templates
Create and publish Handlebars templates, supply structured data, and generate repeatable PDF documents.
Convert Excel Workbooks to PDF with an API
Convert XLSX and XLS workbooks to PDF with LibreOffice, preserving the distinction between workbook conversion and HTML rendering.
Convert DOCX Files to PDF with an API
Convert Word documents with LibreOffice through REST or the Node SDK, including fonts, async jobs, and errors.
Render Charts in HTML-to-PDF Documents
Prepare SVG, canvas, and JavaScript charts for PDF output and verify that rendering has finished.
Wait for JavaScript Before Generating a PDF
Choose rendering readiness settings for pages with dynamic content, fonts, and charts.
Use Custom Fonts in HTML-to-PDF Documents
Load fonts for browser-based PDF generation and diagnose fallback, missing glyphs, and layout changes.
Add Page Numbers to HTML-to-PDF Documents
Use Chromium footer placeholders and print margins to add page numbers to generated PDFs.
Fix Page Breaks and Split Tables in HTML-to-PDF Output
Use print CSS to control page breaks, repeat table headers, and handle rows that exceed the available page height.
Add Headers and Footers to HTML-to-PDF Output
Configure Chromium header and footer templates, page-number placeholders, and margins that prevent clipping.
Convert Markdown to PDF with an API
Render Markdown headings, tables, and code blocks as PDF with REST, Python, or the CLI.
Compare
9 articles
RelayPDF vs DocRaptor
Compare rendering engines, document operations, and integration options for RelayPDF and DocRaptor.
RelayPDF vs PDFShift
Compare HTML rendering and the surrounding PDF workflow capabilities of RelayPDF and PDFShift.
Self-Hosted Gotenberg vs a Managed PDF API
Compare operating a Gotenberg deployment with using a managed document API for Chromium and Office conversion.
PrinceXML vs Chromium for HTML-to-PDF Rendering
Compare pagination models and print features when choosing Prince or Chromium for document generation.
html2pdf.js vs a Server-Side HTML-to-PDF API
Compare browser canvas-based PDF generation with server-side printing, including text selection, assets, and deployment.
Serverless Chromium on Vercel vs a PDF API
Evaluate browser packaging, execution limits, and document delivery for a serverless PDF workflow.
Playwright PDF Generation vs a Hosted API
Compare printing through Playwright with a hosted PDF API, including browser operation and input handling.
Puppeteer vs a Hosted HTML-to-PDF API
Compare operating Chromium through Puppeteer with sending HTML to a managed PDF service.
wkhtmltopdf Alternatives for Modern PDF Generation
Evaluate migration from wkhtmltopdf to Chromium or other rendering options using your actual document requirements.
SDKs
6 articles
Generate PDFs in Laravel from Blade Templates
Render Blade templates to HTML, generate PDFs with the PHP SDK, and handle queued jobs and signed webhooks.
Generate PDFs in Next.js with a Route Handler
Create a server-side PDF route and a browser download flow with the official Node SDK.
Convert HTML to PDF in PHP
Generate PDFs with the official PHP SDK or cURL, including HTML, URLs, templates, and async results.
Convert HTML to PDF in Python
Use the official Python SDK to generate PDFs from HTML, URLs, and templates with explicit error handling.
Convert HTML to PDF in Node.js
Generate PDFs from HTML or URLs with the official Node SDK, including response modes and error handling.
Convert HTML to PDF with curl
Send HTML, URLs, Markdown, or template data to the PDF API and save the response from a terminal.
PDF tools
7 articles
Generate QR Codes and Barcodes with an API
Create QR and barcode images, choose an output format, and embed the result in document workflows.
Convert HTML and URLs to PNG with an API
Render HTML or a webpage as an image with explicit dimensions, image options, and response handling.
Fill and Flatten PDF Forms with an API
Inspect AcroForm field names, fill values, and flatten the result with RelayPDF.
Password-Protect PDF Files with an API
Apply PDF passwords and permission settings while understanding what document encryption does and does not protect.
Add Text and Image Watermarks to PDFs with an API
Stamp existing PDFs with text or an image, choose placement, and understand watermark limitations.
Split PDFs and Extract Page Ranges with an API
Keep selected PDF pages, validate page ranges, and download the extracted document through REST or an SDK.
Merge PDF Files with an API
Combine PDF inputs in a defined order, check request limits, and save the merged output.
Use cases
8 articles
Add a Save as PDF Button to Your Website
Build a browser download button backed by a server route that renders HTML without exposing an API key.
Save a Webpage as a PDF Snapshot
Capture a webpage as PDF, store the resulting file, and understand the limits of a point-in-time snapshot.
Export Dashboards and Reports to PDF
Prepare charts, print styles, and rendering readiness for a complete dashboard PDF export.
Convert EML and MSG Email Files to PDF
Send email files to the conversion endpoint and understand how email conversion differs from printing HTML.
Generate Shipping Labels and Packing Slip PDFs
Set custom paper dimensions, combine document templates with barcodes, and check printed label output.
Generate Contract PDFs from Templates
Choose HTML templates or existing PDF forms for contract generation and validate the resulting document.
Generate Certificate PDFs from Templates
Create certificate PDFs from data and HTML templates with deliberate typography and paper dimensions.
Generate Invoice PDFs from HTML
Build an invoice from HTML and data, control print layout, and return a PDF through the API.
Integrations
5 articles
Grok Bot PDF Workflows: Generate, Merge, and Reuse
Plan Grok Bot PDF workflows with RelayPDF: generate reports, merge files, reuse templates, and compare API fees with the agent work they could replace.
Hosted MCP PDF API for Cursor and Claude Code
Point Cursor or Claude Code at https://api.relaypdf.com/mcp, sign in with Clerk, and generate PDFs, screenshots, and Office converts - no key pasted into chat.
Generate PDFs in n8n with RelayPDF
Official n8n-nodes-relaypdf node for HTML, Markdown, URL, and published Handlebars templates. Binary PDF out for Gmail, Slack, and Drive.
Generate PDFs in Zapier with RelayPDF
Generate PDFs in Zapier with the RelayPDF app, map document inputs, and pass the output to later automation steps.
Generate PDFs from a Coding Agent with MCP
Configure the RelayPDF CLI and MCP tools so an agent can generate documents through an authenticated API.
More
2 articles
An Open HTML-to-PDF Rendering Test Suite
Download reproducible HTML and PDF fixtures for pagination, SVG charts, fonts, mixed page sizes, and visual regression testing.
React PDF vs Puppeteer: Generate the Same Report Both Ways
Compare React PDF and Puppeteer using a shared 72-row report, downloadable PDFs, pinned dependencies, and reproducible local measurements.
Ready to generate?
Create a key, fund the wallet with $5 trial credit, and POST HTML, Markdown, a URL, or Office to a production PDF.