Blog
V2 XL now available
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 readingMajor upgrades released!
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 readingNew website launched!
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 readingTest your HTML locally first
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 readingBackground color on header / footer in Headless Chrome
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
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 readingExtract pages out of a PDF with REST API
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 readingGenerate PDF from Cloudflare Worker with Headless Chrome
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 readingSet ViewPortOptions on Chrome > Screenshot API
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
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 readingomitBackground added to Chrome to PDF
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 readingPHP – Generate thumbnail image of PDF or Office file
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 readingNodejs / Javascript Tutorial – Convert PDF to HTML
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 readingConvert HTML to Docx with Nodejs / Javascript
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 readingC# / .NET Tutorial – Convert PDF to HTML
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 readingAdd Passwords to PDFs with Python
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 readingConvert HTML to Image with PHP
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 readingConvert HTML to Image with Node / Javascript
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 readingAdd a Password to a PDF with .NET Core / C#
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 readingNode / Javascript – take a screenshot of a website
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 readingAdd bookmarks to PDF with Nodejs / Javascript
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 readingAdd a Password to a PDF with Nodejs / Javascript
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 readingPHP Tutorial – Convert PDF to HTML
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 readingConvert HTML to Docx with PHP
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 readingConvert HTML to Docx with Python
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