Archive for the ‘Example Uses’ Category


Convert HTML to Docx with C# / .NET Core

July 14th, 2021 / by api2pdf /

Intro If you are writing c# / .net core 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 […]

Read More

C# / .NET Core – Generate thumbnail image of PDF or Office file

July 13th, 2021 / by api2pdf /

Intro If you are writing c# / .net core 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 getting nowhere. […]

Read More

C# / .NET tutorial – Take a screenshot of a website

July 13th, 2021 / by api2pdf /

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 writing c# / .net core and you […]

Read More

Convert HTML to Image with C# / .NET Core

July 13th, 2021 / by api2pdf /

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 all of them for a […]

Read More

Convert HTML to Image or URL to Image with Headless Chrome

October 25th, 2020 / by api2pdf /

Convert HTML to Image or URL to Image with Headless Chrome Headless Chrome provides a great way to take screenshots or images of raw HTML or a URL of a website. If you need to do this at scale with an easy to use API, we’ve got you covered. We provide a super simple API […]

Read More

Convert HTML to PDF with javascript and AngularJS

June 13th, 2019 / by api2pdf /

Intro In some cases you may need to convert HTML to PDF from your client side application. Rendering a high quality PDF is not obvious and doing it purely from javascript isn’t feasible either. You need to be able to use a browser-based PDF engine like wkhtmltopdf or Headless Chrome. If you’re looking to generate […]

Read More

Convert HTML to PDF with javascript and VueJs

June 12th, 2019 / by api2pdf /

Intro VueJs is a popular client side javascript framework. It has risen in prominence as an alternative to juggernauts like ReactJs and Angular. Part of its allure comes from its simplicity and lower barrier to entry. While building a VueJs application, you may find yourself in need of generating PDFs. This can push you down […]

Read More

Generate Barcodes and QR codes with Javascript and jQuery (ZXING)

March 20th, 2019 / by api2pdf /

One of the best ways to generate barcodes and QR codes is to use the open source library Zebra Crossing, aka ZXING. It’s available in multiple programming languages, but you can only reliably generate these codes on the server-side. If you are reading this blog post, it probably means you are hoping you can simply […]

Read More

Generate PDF with Python Flask or Django

February 17th, 2019 / by api2pdf /

If you are building a web application in Python with either of the two most popular frameworks – Flask or Django, there’s a good chance you will need to support functionality for PDF generation. Convert HTML to PDF with Flask or Django To generate PDFs, we are going to use API2PDF. API2PDF is a REST […]

Read More

Generate PDFs from Salesforce Apex

February 5th, 2019 / by api2pdf /

We released the full code and documentation on GitHub.  See full details on how to generate PDFs using Salesforce. Many developers moving to Salesforce are used to the power of .NET or Java and have their favorite way of generating PDFs from HTML.  Api2Pdf is a wrapper for wkhtmltopdf, Headless Chrome, and LibreOffice and proudly runs […]

Read More