예제 #1
0
        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));
        }
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        public ActionResult Browse()
        {
            var rpt            = new IListPdfReport().CreatePdfReport();
            var outputFilePath = rpt.FileName.Replace(HttpRuntime.AppDomainAppPath, string.Empty);

            return(Redirect(outputFilePath));
        }
예제 #5
0
        public ActionResult Flush1()
        {
            var rpt            = new IListPdfReport().CreatePdfReport();
            var outputFilePath = rpt.FileName.Replace(HttpRuntime.AppDomainAppPath, string.Empty);

            return(File(outputFilePath, "application/pdf", "pdfRpt.pdf"));
        }
예제 #6
0
        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));
        }
예제 #7
0
        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>
        }
예제 #8
0
        public ReportOptionDialog(IListPdfReport reportHelper, AdminwsOfCloudPOS unitofwork)
        {
            InitializeComponent();

            _unitofwork   = unitofwork;
            _reportHelper = reportHelper;

            DpFrom.SelectedDate = DateTime.Now;
            DpTo.SelectedDate   = DateTime.Now;
        }