Blog

Back to blog posts

iTextSharp Alternative for Converting HTML to PDF in C# and Java

Published Jul 28, 2018

Ten years ago, there were very few options to converting HTML to PDF. At the time, we were talking about a handful of PDF rendering engines such as ABCPDF, TCPDF, and iTextSharp. iText reigned supreme over the .NET and Java world. It provided free, open-source DLLs that you could include in your application and it worked very well.

Unfortunately, some time in 2012, iTextSharp’s licensing model changed and it was no longer free for commercial use. But somehow, C# and Java developers still find themselves gravitating towards iText for their PDF generation despite the fact that you need to Request a Quote on their website.

There is no reason why you should have to spend so much money and jump through too many hoops to convert HTML to PDF. You should be able to get started in minutes.

iTextSharp Alternative for Converting HTML to PDF in C# and Java

Api2Pdf is a REST API for converting HTML to PDF using AWS Lambda. No rate limits and no file size limits. You can also convert URLs to PDFs, Office Documents to PDF, and Merge PDFs together.

For C# developers, we offer a great nuget package to connect to the API immediately. Check it out on Github here.

For Java developers, see our documentation for our REST API here. It’s free to get started and most customers pay about $2 per month.

You should never have to request a quote.

Api2Pdf is a wrapper for wkhtmltopdf and Headless Chrome. Both of these engines are open source and wonderful to use. The purpose of Api2Pdf is to simplify the usage for connecting to these libraries (we take the load off your servers and provide easy API calls for you). However, if you prefer to not use any API at all, we would still recommend putting in the time and effort to install these libraries locally on your own servers instead of using iTextSharp.