Extract pages out of a PDF with REST API

March 12th, 2022 / by api2pdf /

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. Extract pages out of […]

Read More

Generate PDF from Cloudflare Worker with Headless Chrome

January 9th, 2022 / by api2pdf /

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 application on top of workers and need to […]

Read More

Set ViewPortOptions on Chrome > Screenshot API

December 22nd, 2021 / by api2pdf /

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, there may be use cases where you want to […]

Read More

omitBackground added to Chrome to PDF

October 10th, 2021 / by api2pdf /

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 customers. When PuppeteerSharp added support, we updated our endpoints […]

Read More

[Resolved] PdfSharp – invalid entry in XRef table

October 10th, 2021 / by api2pdf /

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-licensed PdfSharpCore library. You may be using this […]

Read More

Add a Password to a PDF with PHP

July 14th, 2021 / by api2pdf /

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 php developer. Our API will take your .pdf file and return back to you a new .pdf file with the […]

Read More

Add bookmarks to PDF with PHP

July 14th, 2021 / by api2pdf /

Intro If you are working with PDFs as a php 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 […]

Read More

PHP Tutorial – Convert PDF to HTML

July 14th, 2021 / by api2pdf /

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 HTML […]

Read More

PHP – Convert HTML to Xlsx

July 14th, 2021 / by api2pdf /

Intro If you are writing php code, you might be tasked with the strange requirement of converting HTML to a Microsoft Excel (xlsx) 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 answers […]

Read More

Convert HTML to Docx with PHP

July 14th, 2021 / by api2pdf /

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 or confusing answers that ask you to […]

Read More