Closed eskye closed 4 years ago
Hi, you could do something like this
var pdf = await _generatePdf.GetByteArrayViewInHtml(htmlView, data);
var pdfStream = new System.IO.MemoryStream();
pdfStream.Write(pdf, 0, pdf.Length);
pdfStream.Position = 0;
return new FileStreamResult(pdfStream, "application/pdf") { FileDownloadName = "New Name.pdf" };
Thank you so much for the quick response, I will try it out and drop feedback here.
Hi
Have been trying to set a name for the document generated using the
_generatePdf.GetByteArrayViewInHtml()
. Please how can I go about this? Instead of theDocument
given as the default title when you preview or download, I want to be able to change it.Thanks.