R
Random
I have tried all the Response methods I can think of (WriteFile,
BinaryWrite, OutputStream) to write the byte array of a pdf file to the
response. The result looks like it's trying, it comes up as a blank PDF
file (without the Adobe toolbar that normally comes up). Here is the code I
am using...
'...fPDF is my Byte array
'...I've already verified it is valid by writing the array to a physical
file ("result.pdf") and opening it manually
'----------------------------------------------
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
'...trying WriteFile
Response.WriteFile("~/xml/result.pdf")
'...trying BinaryWrite
Response.BinaryWrite(fPDF)
'...trying OutputStream
Response.OutputStream.Write(fPDF, 0, fPDF.Length)
Response.Flush()
Response.Close()
'--------------------------------------------
Is it possibly because the requested page has the *.aspx extension? If it
is, is there a way around this?
BinaryWrite, OutputStream) to write the byte array of a pdf file to the
response. The result looks like it's trying, it comes up as a blank PDF
file (without the Adobe toolbar that normally comes up). Here is the code I
am using...
'...fPDF is my Byte array
'...I've already verified it is valid by writing the array to a physical
file ("result.pdf") and opening it manually
'----------------------------------------------
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
'...trying WriteFile
Response.WriteFile("~/xml/result.pdf")
'...trying BinaryWrite
Response.BinaryWrite(fPDF)
'...trying OutputStream
Response.OutputStream.Write(fPDF, 0, fPDF.Length)
Response.Flush()
Response.Close()
'--------------------------------------------
Is it possibly because the requested page has the *.aspx extension? If it
is, is there a way around this?