Esempio n. 1
0
 public virtual FileContentResult DownloadPDF(Guid id)
 {
     var flightLog = Repository.Get<FlightLog>(id);
     var reportGenerator = new PdfReportGenerator(new FlightTimeSummaryReport(flightLog));
     var bytes = reportGenerator.GenerateReport();
     return File(bytes, "application/pdf", "FlightTimeSummary(" + flightLog.LogDate.ToString("MM-dd-yy") + ").pdf");
 }
Esempio n. 2
0
 public void Should_Generate_XSLFO()
 {
     var xslfo = new PdfReportGenerator(new FlightTimeSummaryReport(CreateFlightLog())).GenerateXslFo();
     Console.Out.WriteLine(xslfo.ToString());
 }
Esempio n. 3
0
 public void Should_Generate_PDF()
 {
     var bytes = new PdfReportGenerator(new FlightTimeSummaryReport(CreateFlightLog())).GenerateReport();
     var fileName = Path.GetTempFileName() + ".pdf";
     File.WriteAllBytes(fileName, bytes);
     Process.Start(fileName);
 }
Esempio n. 4
0
 public void Should_Generate_XML()
 {
     var xml = new PdfReportGenerator(new FlightTimeSummaryReport(CreateFlightLog())).GenerateXml();
     Console.Out.WriteLine(xml.ToString());
 }