The API2PDF blog

Tutorials

Step-by-step guides for generating PDFs, images and documents with API2PDF in Python, PHP, Node, C#, Java, Go, Ruby and more.

Generate PDFs in Spring Boot with Api2Pdf: Thymeleaf Templates, RestClient and @Async Email

Generate PDFs in Spring Boot: Thymeleaf templates to PDF with a RestClient Api2Pdf client, PDF downloads, @Async email and password-protected packets.

Read the post

Generate PDFs in Ruby on Rails with Api2Pdf: ERB Views, Active Job and Active Storage

Generate PDFs in Rails: ERB views to PDF with a Net::HTTP client, format.pdf downloads, Active Job and Active Storage, merged p...

Generate PDFs in Laravel with Api2Pdf: Blade Templates, Queued Jobs and Watermarks

Generate PDFs in Laravel: Blade views to PDF with the Http client, queued jobs that store and email them, and DRAFT/CONFIDENTIA...

Generate PDFs in FastAPI with Api2Pdf: Streaming Responses, Background Tasks and Jinja2

Build PDF downloads in FastAPI: a typed Api2Pdf client with httpx, StreamingResponse for invoices, BackgroundTasks for email, a...

Generate PDFs in Next.js App Router with Api2Pdf: Route Handlers, Server Actions and Vercel

Generate PDFs in Next.js 15 and 16: a server-only Api2Pdf client, a Route Handler that streams the PDF, Server Actions, and pri...

Shipping Labels and Event Tickets: QR Codes and Barcodes in PDFs with Api2Pdf

Generate Code 128 and QR codes with the Api2Pdf /zebra endpoint and render 4x6 shipping labels and signed event tickets as PDFs...

Batch PDF Generation in Production: Zip PDFs and Upload Straight to S3 with Api2Pdf

Render hundreds of PDFs in parallel, bundle them with the Api2Pdf /zip endpoint, and PUT the archive into S3 with useCustomStor...

Migrating off wkhtmltopdf to Headless Chrome: A Practical Guide for 2026

wkhtmltopdf is archived. Map every flag to Headless Chrome, fix headers, footers and CSS, and switch Api2Pdf endpoints with a t...

Generate PDFs from Cursor and Claude Code with the Api2Pdf MCP Server: A Hands-On Guide

Hands-on guide to the Api2Pdf MCP server: connect Cursor, Claude Code and VS Code, use all 11 tools, generate invoices, merge P...

Build a RAG Pipeline in Python with Api2Pdf OpenDataLoader and MarkItDown

Build a Python RAG pipeline: convert PDFs and Office files with OpenDataLoader and MarkItDown, then chunk, embed, and query.

Background color on header / footer in Headless Chrome

Header and footer templates in Headless Chrome ignore background colors by default. The CSS that makes them print, with Puppete...

Generate PDF from Cloudflare Worker with Headless Chrome

Cloudflare Workers cannot run Headless Chrome. Call the Api2Pdf REST API from a Worker with fetch to convert HTML or URLs to PD...

Add Passwords to PDFs with Python

Add a user and owner password to an existing PDF from Python with the PdfSharp password endpoint. A few lines of code.

Page 1 of 6 · 71 posts

Generate your first PDF in minutes

Create an account, grab an API key, and send one POST request. Pay only for what you use.