public PdfHelper(string pdfFileName, PdfConfig pdfConfig) { this.pdfFileName = pdfFileName; Config = pdfConfig; Document = new Document(); Document.SetPageSize(pdfConfig.PageLayout); Document.SetMargins(Config.MarginLeft, Config.MarginRight, Config.MarginTop, Config.MarginBottom); // in pt Writer = PdfWriter.GetInstance(Document, new FileStream(pdfFileName, FileMode.Create)); Writer.PageEvent = new PageEvents(pdfConfig); Document.Open(); }
public PageEvents(PdfConfig pdfConfig) { config = pdfConfig; }