Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public PageEvents(PdfConfig pdfConfig)
 {
     config = pdfConfig;
 }