Pages

Tuesday, February 17, 2015

iTextSharp hates your HTML5


When it comes to PDF generation in .Net there aren't many open source projects to choose from, so by default many people choose the most popular community driven project, iTextSharp. With a relatively easy learning curve and decent API, iTextSharp can address most simple scenarios for generating PDF's, and with a little more effort can render even more complex PDF's as well. iTextSharp has been essentially free using the LGPL license, but with the introduction of version 5, the AGPL license has clouded the waters a bit.

This post addresses a potential gotcha when using the iTextSharp XmlWorker to render HTML5 to PDF's.