private static void _export(bool isLandscape = false, float?marginLeft = 5, float?marginRigth = 5, float?marginTop = 5, float?marginBottom = 18) { using (var pdf = new ExportPdfProvider(_pathTempSaveFile)) { pdf.ConfigPdfFile("A4", marginLeft, marginRigth, marginTop, marginBottom); _pathTempSaveFile = pdf.Export(_bodyContent, _headerContent, _footerContent, isLandscape); } }
private static void Export(bool isLandscape = false) { using (var pdf = new ExportPdfProvider(_pathTempSaveFile)) { pdf.ConfigPdfFile("A4", 5, 5, 5, 18); //apply page number var footer = _footerContentFormat.Replace("istFooterPageSize", _footerContent); _pathTempSaveFile = pdf.Export(_bodyContent, _headerContent, footer, isLandscape); } }
public static string ExportPdfWithMultiContentWithMultiHeaderFooter(string desPath, List <PdfObject> list, float?marginLeft = 24, float?marginRigth = 24, float?marginTop = 45, float?marginBottom = 45) { _setUrl(); _pathTempSaveFile = desPath; using (var pdf = new ExportPdfProvider(_pathTempSaveFile)) { pdf.ConfigPdfFile("A4", marginLeft, marginRigth, marginTop, marginBottom); pdf.WritePdfWithMultiContentHeaderFooter(list); } if (File.Exists(desPath)) { return(desPath); } return(null); }