2018-03-20
this.Response.AddHeader("Content-Type", "application/pdf"); this.Response.AddHeader("Content-Disposition", "attachment; filename=SampleGuide.pdf"); this.Response.Flush(); this.Response.BinaryWrite(documentContent); //DocumentContent is a Byte[] of the data to be written in PDF this.Response.Flush(); this.Response.End(); |
"application/x-pdf" 有待查
documentContent 的格式有待查
The application/pdf Media Type draft-hardy-pdf-mime-05
https://tools.ietf.org/html/draft-hardy-pdf-mime-05
The application/pdf Media Type
https://tools.ietf.org/html/rfc8118
The application/pdf Media Type
https://www.ietf.org/rfc/rfc3778.txt
Adobe Portable Document Format (PDF)
https://acrobat.adobe.com/us/en/acrobat/about-adobe-pdf.html
ISO 32000-1:2008 Document management -- Portable document format -- Part 1: PDF 1.7
https://www.iso.org/standard/51502.html
https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf
ISO 32000-2:2017 Document management -- Portable document format -- Part 2: PDF 2.0
https://www.iso.org/standard/63534.html
https://www.dpconline.org/docs/technology-watch-reports/1707-twr17-01-revised/file
太麻煩了,另找方法
(待續)
沒有留言:
張貼留言