Example #1
0
        private void Render_Report_With_Images(string reportOutputDirectory,
                                               string reportDataFilePath)
        {
            var jsonData     = Read_Report_Data(reportDataFilePath);
            var inputMessage = Create_Word_Input_Message(jsonData);

            _usecase.Execute(inputMessage, _presenter);

            _presenter.Render(reportOutputDirectory);
        }
        private void Render_Pdf_Report(string reportOutputDirectory,
                                       string reportDataFilePath)
        {
            var jsonData     = Read_Report_Data(reportDataFilePath);
            var inputMessage = Create_Word_Input_Message(jsonData);

            _pdfUseCase.Execute(inputMessage, _presenter);

            _presenter.Render(reportOutputDirectory, "pdf");
        }
Example #3
0
        public IActionResult Create_Pdf()
        {
            var jsonData = Read_Report_Json();

            var inputMessage = new RenderWordInput
            {
                TemplateName = "ReportWithImages",
                ReportName   = "ExampleReport.docx",
                JsonModel    = jsonData
            };
            var presenter = new DownloadFilePresenter();

            _pdfUsecase.Execute(inputMessage, presenter);
            return(presenter.Render());
        }