anitha2324
09-16-2007, 11:34 AM
Hi all am trying to open a page or report in pdf
i got the following from the net and i tried it
the script is as the following
<%
Response.buffer = true
with response
.Clear
.ContentType = "application/pdf"
.Charset = "UTF-8"
.AddHeader "Content-Disposition","attachment;filename=test.pdf"
end with
Response.Write "Hi to my pdf file "
Response.Flush
Response.end
%>
when i run the above program it asks me whether to download or save the pdf files and in the both cases am getting the following error when am trying to open it
"Adobe Reader could not opent 'test[1].pdf' because it is either not a supported file type or because the file has been corrupted ( fro example , it was sent as an email attachment and wasn't correctly decoded)"
plz help me am newbie to ASP
i got the following from the net and i tried it
the script is as the following
<%
Response.buffer = true
with response
.Clear
.ContentType = "application/pdf"
.Charset = "UTF-8"
.AddHeader "Content-Disposition","attachment;filename=test.pdf"
end with
Response.Write "Hi to my pdf file "
Response.Flush
Response.end
%>
when i run the above program it asks me whether to download or save the pdf files and in the both cases am getting the following error when am trying to open it
"Adobe Reader could not opent 'test[1].pdf' because it is either not a supported file type or because the file has been corrupted ( fro example , it was sent as an email attachment and wasn't correctly decoded)"
plz help me am newbie to ASP