The API2PDF blog

Blog

Release notes, tutorials in every language, troubleshooting guides and engineering notes from the team behind the PDF API.

New website launched!

api2pdf.com moved from WordPress on WP Engine to Raytha, the open source .NET CMS built by the same team. Why we switched and w...

Test your HTML locally first

A quick way to troubleshoot PDF output: save the exact HTML you send to Api2Pdf as a file, open it in Chrome and use print prev...

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...

[resolved] 403 Forbidden error message in logs

A 403 in your logs on any-to-pdf, merge, password or bookmarks means your server refused Api2Pdf's download request. How to all...

Extract pages out of a PDF with REST API

The new PdfSharp extract-pages endpoint returns a PDF containing only the page range you specify. Documentation and examples.

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...

Set ViewPortOptions on Chrome > Screenshot API

The /chrome/image endpoints now accept a custom viewport width and height, so you can simulate mobile and other screen sizes in...

omitBackground added to Chrome to PDF

Set omitBackground to true on the Chrome PDF endpoints to render a transparent page background. Added with PuppeteerSharp 5.1.0.

[Resolved] PdfSharp – invalid entry in XRef table

The 'invalid entry in XRef table' error when merging PDFs with PdfSharpCore, what causes it in the source PDFs and the workarou...

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.

Convert HTML to Docx with PHP

Generate a Microsoft Word document from HTML in PHP with the LibreOffice html-to-docx endpoint, without installing LibreOffice.

Convert HTML to Image with Node / Javascript

Render HTML to a PNG or JPEG image from Node.js with Headless Chrome through the Api2Pdf REST API. A few lines of JavaScript, n...

Python – Convert HTML to Xlsx

Turn an HTML table into an Excel workbook from Python with the LibreOffice html-to-xlsx endpoint. Sample code included.

Page 2 of 11 · 138 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.