Пример #1
0
        public JsonResult Render()
        {
            var reportData = reportRenderer.Render();
            var pdf        = wordToPdfConverter.Convert(reportData.RenderedBytes);

            CachedImages = pdfToPngConverter.Convert(pdf);
            return(Json(new
            {
                Log = string.Join("<br>", reportData.Log),
                PagesCount = CachedImages.Length
            }, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public JsonResult Render(string templateName)
        {
            var templateDirectoryPath = GetTemplateDirectoryPath(templateName);
            var renderedReport        = reportRenderer.Render(templateDirectoryPath);
            var pdf = wordToPdfConverter.Convert(renderedReport.Bytes);

            CachedImages = pdfToPngConverter.Convert(pdf);
            return(Json(new
            {
                Log = string.Join("<br/>", renderedReport.Log),
                PagesCount = CachedImages.Length
            }));
        }