Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
        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);
        }