Beispiel #1
0
        public IActionResult LoadStreamWithOption(string filePath = @"Documents/User story 90 pull request.PNG")
        {
            //var content = _documentViewer.ViewAsHtml(filePath);
            //return Ok(content);

            //var content = _documentViewer.ViewAsPdf(filePath);
            //return File(content, "application/pdf");
            var currentTime = DateTime.Now;
            var content     = _documentViewer.ViewAsPngWithLoadOption(filePath);

            //return Ok(DateTime.Now - currentTime);
            return(File(content, "application/png"));
        }