Пример #1
0
        public IActionResult getpdf(PdfReportParameter rptParameter)
        {
            //var rparam = JsonConvert.DeserializeObject<PdfReportParameter>(rptParameter.ToString());
            //PdfReportParameter rparam = rptParameter as PdfReportParameter;
            var res = pdfConverter.OpenPdfReport(rptParameter);

            if (res.status == "ok")
            {
                MemoryStream memStream = new MemoryStream((byte[])res.result);
                return(File((byte[])res.result, "application/pdf", "singlePdf.pdf"));
            }
            return(new BadRequestObjectResult(res));
        }