C
charmis
I wanna know as to how to download a webpage to a pdf file.
Iam able to download to word file as well as excel file. Here is the code
below?
Select Case Request.QueryString("ftype")
Case "Word"
Response.ContentType = "application/msword"
Response.AddHeader("Content-Disposition", "attachment;filename=" &
lblProjectName.Text & "defcat.doc")
Case "Excel"
Response.ContentType = "application/msexcel"
Response.AddHeader("Content-Disposition", "attachment;filename" &
lblProjectName.Text & "defcat.xls")
Case "PDF"
Response.ContentType = "application/pdf"
Response.AppendHeader("Content-Disposition", "attachment;filename=" &
lblProjectName.Text & "defcat.pdf")
End Select
Iam also able to download to pdf file but when I open the pdf file, it says
---------------------------------------------------------------------------------------------------------------------
Acrobat could not open 'bdkms.pdf' because it is either not a supported file
type or because the file has been corrupted (for example, it was sent as an
email attachment and wasn't correctly decoded).
----------------------------------------------------------------------------------------------------------------------
Iam able to open the downloaded word file and excel file successfully.
Below the above code, I have a generated report which will the content of
the downloaded file..
Thankz
Iam able to download to word file as well as excel file. Here is the code
below?
Select Case Request.QueryString("ftype")
Case "Word"
Response.ContentType = "application/msword"
Response.AddHeader("Content-Disposition", "attachment;filename=" &
lblProjectName.Text & "defcat.doc")
Case "Excel"
Response.ContentType = "application/msexcel"
Response.AddHeader("Content-Disposition", "attachment;filename" &
lblProjectName.Text & "defcat.xls")
Case "PDF"
Response.ContentType = "application/pdf"
Response.AppendHeader("Content-Disposition", "attachment;filename=" &
lblProjectName.Text & "defcat.pdf")
End Select
Iam also able to download to pdf file but when I open the pdf file, it says
---------------------------------------------------------------------------------------------------------------------
Acrobat could not open 'bdkms.pdf' because it is either not a supported file
type or because the file has been corrupted (for example, it was sent as an
email attachment and wasn't correctly decoded).
----------------------------------------------------------------------------------------------------------------------
Iam able to open the downloaded word file and excel file successfully.
Below the above code, I have a generated report which will the content of
the downloaded file..
Thankz