public string CreateReport(string name) { // To view its implementation, right click on the method and then select `go to implementation` var rpt = new IListPdfReport().CreatePdfReport(); //returns the created pdf file's path return rpt.FileName.Replace(HttpRuntime.AppDomainAppPath, string.Empty); }
void MainWindow_Loaded(object sender, System.Windows.RoutedEventArgs e) { // To view its implementation, right click on the method and then select `go to implementation` var rpt = new IListPdfReport().CreatePdfReport(); WebBrowser1.Source = new Uri(rpt.FileName + "#navpanes=0&scrollbar=0&toolbar=0"); //<object type="application/pdf" data="file1.pdf#navpanes=0&scrollbar=0&toolbar=0" width="500" height="650" >Click <a href="file1.pdf">here</a> to view the file</object> }
private string mergeMultipleReports() { var rpt1 = new IListPdfReport().CreatePdfReport(); var rpt2 = new HexDumpPdfReport().CreatePdfReport(); var finalMergedFile = System.IO.Path.Combine(AppPath.ApplicationPath, "Pdf\\mergedFile.pdf"); new MergePdfDocuments { DocumentMetadata = new DocumentMetadata { Author = "Vahid", Application = "PdfRpt", Keywords = "Test", Subject = "MergePdfFiles Rpt.", Title = "Test" }, InputFileStreams = new[] { new FileStream(rpt1.FileName, FileMode.Open, FileAccess.Read, FileShare.Read), new FileStream(rpt2.FileName, FileMode.Open, FileAccess.Read, FileShare.Read) }, OutputFileStream = new FileStream(finalMergedFile, FileMode.Create), AttachmentsBookmarkLabel = "Attachment(s) ", WriterCustomizer = importedPageInfo => { addNewPageNumbersToFinalMergedFile(importedPageInfo); } } .PerformMerge(); return finalMergedFile; }
private void createRpt() { // To view its implementation, right click on the method and then select `go to implementation` var rpt = new IListPdfReport().CreatePdfReport(); WindowsFormsHost1.Child = new AcroReader(rpt.FileName); }
protected void btnBrowse_Click(object sender, EventArgs e) { // To view its implementation, right click on the method and then select `go to implementation` var rpt = new IListPdfReport().CreatePdfReport(); Response.Redirect(rpt.FileName.Replace(HttpRuntime.AppDomainAppPath, string.Empty)); }
public ActionResult Flush1() { var rpt = new IListPdfReport().CreatePdfReport(); var outputFilePath = rpt.FileName.Replace(HttpRuntime.AppDomainAppPath, string.Empty); return File(outputFilePath, "application/pdf", "pdfRpt.pdf"); }
public ActionResult Browse() { var rpt = new IListPdfReport().CreatePdfReport(); var outputFilePath = rpt.FileName.Replace(HttpRuntime.AppDomainAppPath, string.Empty); return Redirect(outputFilePath); }