예제 #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");
 }
예제 #2
0
 public void Should_Generate_XSLFO()
 {
     var xslfo = new PdfReportGenerator(new FlightTimeSummaryReport(CreateFlightLog())).GenerateXslFo();
     Console.Out.WriteLine(xslfo.ToString());
 }
예제 #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);
 }
예제 #4
0
 public void Should_Generate_XML()
 {
     var xml = new PdfReportGenerator(new FlightTimeSummaryReport(CreateFlightLog())).GenerateXml();
     Console.Out.WriteLine(xml.ToString());
 }