Generate PDF from HTML using itextsharp.dll
Posted on StackOverflow on Nov 20, 2015 by Cristian Capannini
These are the DLLs you need to include in your project:
-
iTextSharp DLL: (Required) I am assuming that you downloaded itextsharp-all-5.5.7.zip You need the itextsharp.dll that is stored in itextsharp-dll-core.zip
-
PDF/A, PDF/UA, ZUGFeRD DLL: (Optional) If you want to produce PDF/A or PDF/UA or ZUGFeRD PDFs rather than plain old PDFs, then you also need itextsharp.pdfa.dll from itextsharp-dll-pdfa.zip. I would highly recommend making your PDFs at least accessible for the blind and the visually impaired. Most developer just don't care about PDF/UA and that's problematic.
-
XML Worker: (Required) Since you want to convert HTML to PDF, you also need to download XML Worker: itextsharp.xmlworker-all-5.5.7.zip. In this zip, you'll find itextsharp-dll-xmlworker.zip. You need itextsharp.xmlworker.dll because that's where you'll find all the XML Worker classes.