Skip to content Skip to sidebar Skip to footer

How Create Pdf/a File From Html Using Itextsharp

I want to create PDF/A from HTML using iTextsharp, but is having a hard time creating something that validateds to PDF/. This is the code that I use to test the functionality. What

Solution 1:

PDFX1A2001 requires a version 1.3 PDF or less but setting the PDFXConformance property alone doesn't do this, you must manually do it:

writer.SetPdfVersion(PdfWriter.PDF_VERSION_1_3);

Additionally, you also need to call CreateXmpMetadata() to "apply" the metadata.

writer.CreateXmpMetadata();

Mostpeople seem to do it just before closing the document but I don't know if this is a requirement.

Post a Comment for "How Create Pdf/a File From Html Using Itextsharp"