The API2PDF blog

Troubleshooting

Fixes for errors, timeouts and rendering issues when converting HTML, URLs and Office files to PDF.

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

Read the post

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

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

[Resolved] Issue downloading PDF with Java

Java code that downloads the PDF returned by Api2Pdf and saves it locally without corrupting the file, using Apache HttpClient.

[Resolved] PDF is rendering blank or only partially with Headless Chrome

Blank or half-rendered PDFs usually mean javascript had not finished, assets were blocked, or lazy loading. The causes and the ...

[Solved] Bootstrap striped table not printing to PDF

Browsers drop background colors when printing. Add -webkit-print-color-adjust: exact so Bootstrap striped rows and other backgr...

[Solved] Troubleshooting rendering issues with HTML to PDF

A repeatable way to debug a PDF that does not look like your HTML: save the HTML, open it in Chrome, use print preview and the ...

[Resolved] Bad kerning with wkhtmltopdf rendering of html

wkhtmltopdf spaces letters incorrectly with some fonts such as Roboto. The font-format and engine choices that resolve the kern...

[Solved] Error – Couldn’t connect to server localhost

Api2Pdf runs in the cloud and cannot reach localhost. Send the HTML directly, or make the page reachable on a public URL, when ...

[Solved] Headless Chrome options ignoring landscape mode when printing to pdf

A page's own @page CSS size rule overrides the landscape option in Headless Chrome. How we found it and the preferCSSPageSize fix.

[Solved] Accessing a secure page with a URL endpoint

The URL-to-PDF endpoint cannot sign in to your app. Options: render the HTML server side and send it, or expose the page with a...

[Solved] Access denied | v2018.api2pdf.com used Cloudflare to restrict access

Getting 'Access denied | v2018.api2pdf.com used Cloudflare to restrict access'? Your HTTP client is missing a User-Agent header...

[Solved] Issue rendering UTF-8 or Unicode characters in HTML and PDFs

Accented and non-Latin characters show up as garbage in your PDF? Add the UTF-8 meta charset and encode the payload correctly. ...

Page 1 of 2 · 16 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.