Ejemplo n.º 1
0
        private static void Main()
        {
            System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
            Stopwatch sw             = new Stopwatch();
            var       noOfIterations = TotalRecords / noOfRecordsPerFile;

            for (var i = 0; i < noOfIterations; i++)
            {
                var reportService = new ReportPdf();

                sw.Restart();
                var reportData = CreateReportData();
                var path       = GetTempPdfPath();
                reportService.Export(path, reportData);
                sw.Stop();
                Console.WriteLine("Time taken" + sw.Elapsed.TotalSeconds);
                //Process.Start(path);
            }
            sw.Reset();
            sw.Start();
            Console.WriteLine();
            ReportPdf.CombinePDFs(@"D:\APDFData", "ConcatenatedDocument1_tempfile.pdf");
            sw.Stop();
            Console.WriteLine("Time taken to combine the pdf" + sw.Elapsed.TotalSeconds);
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        private static void Main()
        {
            Stopwatch sw             = new Stopwatch();
            var       noOfIterations = TotalRecords / noOfRecordsPerFile;

            for (var i = 0; i < noOfIterations; i++)
            {
                var reportService = new ReportPdf();

                sw.Restart();
                var reportData = CreateReportData();
                var path       = GetTempPdfPath();
                reportService.Export(path, reportData);
                sw.Stop();
                Console.WriteLine("Time taken" + sw.Elapsed.TotalSeconds);
                Process.Start(path);
            }
            sw.Reset();
            sw.Start();
            Console.WriteLine();
            ReportPdf.CombinePDFs(@"D:\GeneratedPDF", "ConcatenatedDocument1_tempfile.pdf");
            sw.Stop();
            Console.WriteLine("Time taken to combine the pdf" + sw.Elapsed.TotalSeconds);
            Console.ReadLine();
        }