Blog

V2 XL now available

Published Nov 12 2024

Our default public SaaS line at v2.api2pdf.com has the current limitations of 2 gb of memory, 2 CPU, and 90 second timeout. We are announcing the release of V2 XL at: v2-xl.api2pdf.com. You can use this endpoint instead if you need more speed, memory, or time. Each request is ...

Continue reading

Major upgrades released!

Published Oct 28 2024

Happy Halloween, everyone! We’re thrilled to announce that we’ve completed a significant upgrade rollout. Here’s a summary of the updates and what we’ve accomplished. Complete Overhaul of Code Architecture Our core codebase has been completely rewritten...

Continue reading

New website launched!

Published Oct 08 2024

There is a lot of drama in the industry right now surrounding the Wordpress content management system. Since we launched api2pdf.com, we've been hosting our Wordpress website on WPEngine. See more about this drama here. To be honest, we have not given it all that much thought....

Continue reading

Test your HTML locally first

Published Oct 29 2023

If you’re having trouble with the PDF rendered by API2PDF, here’s a simple way to troubleshoot your HTML locally using Google Chrome: Copy the HTML you’re sending to API2PDF and paste it into a plain text editor like Notepad. Save the file with a .html exten...

Continue reading

Background color on header / footer in Headless Chrome

Published Jul 26 2023

Intro If you are generating PDF files from URLs or HTML with Headless Chrome and are trying to have a background color in the header or footer template of the resulting PDF file, you might be running into issues. This is even the case when you are using puppeteer on top of hea...

Continue reading

[resolved] 403 Forbidden error message in logs

Published Jun 08 2022

If you are seeing a 403 Forbidden error code in your logs when trying to make API calls with the any-to-pdf, merge pdf, password, bookmarks, extract-pages endpoints, this article will point you in the right direction. When you make one of these API calls by passing in a URL to...

Continue reading

Extract pages out of a PDF with REST API

Published Mar 12 2022

Introduction We are proud to announce a new feature with for our PdfSharp endpoints: Extract Pages. With this endpoint, you will be able to specify (optionally), a start and end of a page range of your PDF file and API2PDF will extract a new PDF with just that page range only....

Continue reading

Generate PDF from Cloudflare Worker with Headless Chrome

Published Jan 09 2022

Intro At the time of this post, Cloudflare Workers does not support the idea of embedding Headless Chrome or wkhtmltopdf in its environment. Workers also does not the idea of running docker containers either. This may change in the future, but for now, if you built an applicat...

Continue reading

Set ViewPortOptions on Chrome > Screenshot API

Published Dec 22 2021

We are proud to announce an enhancement to our /chrome/image endpoints which are quickly gaining popularity. You can now declare a custom ViewPort option. Prior to this, you were locked into a 1920 x 1080 viewport, which is the equivalent of a wide screen monitor. However, the...

Continue reading

[Resolved] PdfSharp – invalid entry in XRef table

Published Oct 10 2021

Intro If you found us through Google, welcome! Api2Pdf is a REST API that helps developers generate and interact with PDF files. Among our most popular endpoints is merging or combining PDFs together. To support the merging of PDF files, behind the scenes, our API uses the MIT...

Continue reading

omitBackground added to Chrome to PDF

Published Oct 10 2021

PuppeteerSharp version 5.1.0 has added support for omitBackground flag. This is a boolean option that will, if set to true, make your PDFs have a transparent background. We don’t actually know why people would need this, but it was a feature request from one of our ...

Continue reading

PHP – Generate thumbnail image of PDF or Office file

Published Jul 14 2021

Intro If you are writing php code, you might be tasked with generating an image preview or thumbnail image of a PDF or Microsoft Office file like Word, Powerpoint, Excel, or even email files. If you ended up on this article you probably have been doing research for hours and g...

Continue reading

Nodejs / Javascript Tutorial – Convert PDF to HTML

Published Jul 14 2021

Intro For those who are nodejs developers, you might have a niche requirement to convert a PDF into HTML, or extract text content from a PDF for indexing purposes. Here at API2PDF, we have a PDF to HTML endpoint that does a best effort to extract the text from a PDF and output...

Continue reading

Convert HTML to Docx with Nodejs / Javascript

Published Jul 14 2021

Intro If you are writing nodejs / javascript code, you might be tasked with generating a Microsoft Word (Docx) file. After some research, you discover that this is not as trivial as you hoped it would be. You might have ended up on stackoverflow seeing old, outdated libraries ...

Continue reading

C# / .NET Tutorial – Convert PDF to HTML

Published Jul 14 2021

Intro For those who are c# / .net core developers, you might have a niche requirement to convert a PDF into HTML, or extract text content from a PDF for indexing purposes. Here at API2PDF, we have a PDF to HTML endpoint that does a best effort to extract the text from a PDF an...

Continue reading

Add Passwords to PDFs with Python

Published Jul 14 2021

Intro API2PDF is a REST API that provides utilities for manipulating PDFs and other files. You landed here because you just want a simple and reliable way to add passwords to PDF files as a python developer. Our API will take your .pdf file and return back to you a new .pdf fi...

Continue reading

Convert HTML to Image with PHP

Published Jul 14 2021

Intro You might need to convert HTML to an image or HTML to png format for various reasons. Perhaps you are generating a snapshot or image preview of an HTML template you designed as part of your application. Maybe you are crawling websites and would like an image preview of a...

Continue reading

Convert HTML to Image with Node / Javascript

Published Jul 14 2021

Intro You might need to convert HTML to an image or HTML to png format for various reasons. Perhaps you are generating a snapshot or image preview of an HTML template you designed as part of your application. Maybe you are crawling websites and would like an image preview of a...

Continue reading

Add a Password to a PDF with .NET Core / C#

Published Jul 14 2021

Intro API2PDF is a REST API that provides utilities for manipulating PDFs and other files. You landed here because you just want a simple and reliable way to add passwords to PDF files as a c# / .net core developer. Our API will take your .pdf file and return back to you a new...

Continue reading

Node / Javascript – take a screenshot of a website

Published Jul 14 2021

Intro You might need to convert a URL to an image, URL to PNG, or automatically take a screenshot of a website for various reasons. Maybe you are crawling websites and would like an image preview of all of them for a database. In either case, if you’re a nodejs developer...

Continue reading

Add bookmarks to PDF with Nodejs / Javascript

Published Jul 14 2021

Intro If you are working with PDFs as a nodejs developer, you know the pain associated with working with them. In this post we will cover how to conveniently add bookmarks to a PDF using our REST API in just a few lines of code. Our API will take your .pdf file and return back...

Continue reading

Add a Password to a PDF with Nodejs / Javascript

Published Jul 14 2021

Intro API2PDF is a REST API that provides utilities for manipulating PDFs and other files. You landed here because you just want a simple and reliable way to add passwords to PDF files as a nodejs developer. Our API will take your .pdf file and return back to you a new .pdf fi...

Continue reading

PHP Tutorial – Convert PDF to HTML

Published Jul 14 2021

Intro For those who are php developers, you might have a niche requirement to convert a PDF into HTML, or extract text content from a PDF for indexing purposes. Here at API2PDF, we have a PDF to HTML endpoint that does a best effort to extract the text from a PDF and output an...

Continue reading

Convert HTML to Docx with PHP

Published Jul 14 2021

Intro If you are writing nodejs / javascript code, you might be tasked with generating a Microsoft Word (Docx) file. After some research, you discover that this is not as trivial as you hoped it would be. You might have ended up on stackoverflow seeing old, outdated libraries ...

Continue reading

Convert HTML to Docx with Python

Published Jul 14 2021

Intro If you are writing python code, you might be tasked with generating a Microsoft Word (Docx) file. After some research, you discover that this is not as trivial as you hoped it would be. You might have ended up on stackoverflow seeing old, outdated libraries or confusing ...

Continue reading