Skip to main content
Skip table of contents

Generate PDF from HTML using itextsharp.dll

I want to generate PDF from an ASPX page using a css file. How can I do this using iTextSharp? I've downloaded itextsharp-all-5.5.7, but which of all the DLLs must I include in my c# project?

Posted on StackOverflow on Nov 20, 2015 by Cristian Capannini

These are the DLLs you need to include in your project:

  1. iTextSharp DLL: (Required) I am assuming that you downloaded You need the itextsharp.dll that is stored in

  2. 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 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.

  3. XML Worker: (Required) Since you want to convert HTML to PDF, you also need to download XML Worker: In this zip, you'll find You need itextsharp.xmlworker.dll because that's where you'll find all the XML Worker classes.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.