var stream = PdfUtility.PdfGenaration.GenaratePdfWithStream(body);
above will return bytes.
HttpResponseMessage result1 = new HttpResponseMessage();
result1.Content = new ByteArrayContent(stream);
result1.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment");
result1.Content.Headers.ContentDisposition.FileName = "TEST";
result1.Content.Headers.ContentType = new MediaTypeHeaderValue("application/pdf");
return result1;
var file = new Blob([data], { type: "application/pdf" });
saveAs(file, "test.pdf");
我得到空的pdf.Any一个帮助。