동적으로 PDF를 생성하는 ASP.Net WebForm이 있습니다. pdf 다운로드는 모든 데스크톱 브라우저와 IPad, Chrome 모바일 및 Firefox 모바일에서 작동합니다. 그러나 알림 영역에서 "Download Unsuccessful"이라는 메시지가 표시된 안드로이드 브라우저에서 pdf 다운로드가 실패합니다. 이 코드를 사용하여 응답에 pdf를 작성했습니다.안드로이드 브라우저에서 PDF 다운로드가 실패합니다.
using (PdfDocument pdf = this.RenderPDF())
using (MemoryStream stream = new MemoryStream())
{
pdf.Save(stream, false);
response.Clear();
response.AddHeader("content-disposition", "inline;filename=myPdf.pdf");
response.AddHeader("content-length", stream.Length.ToString());
response.ContentType = "application/pdf";
response.BinaryWrite(stream.ToArray());
response.Flush();
stream.Close();
response.End();
}
안드로이드 브라우저에서 pdf 다운로드를 수행하려면 어떻게해야합니까?
최종 해결책을 시도하셨습니까? – Kiquenet