RE: Export asp.net page to pdf by RehanMustafaKhan
RehanMustafaKhan
Fri Nov 17 04:44:01 CST 2006
Hi Sonali
You have to use some PDF Components freely avaiable on net
or
Use this code
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition",
"inline;filename=CoBrokerTransfer.pdf");
Response.BinaryWrite(result);
Path=Session["Path"].ToString();
FileStream CreatePdf = new FileStream(FilePath + Path,
FileMode.OpenOrCreate, FileAccess.Write);
CreatePdf.Write(result,0,result.Length);
CreatePdf.Close();
This code I have successfully used in one of my projects and tshi will open
the page in PDF and save the file in Path.
Hope this is usefult to you If you have any questions then please reply back.
Regards
Rehan
"sonali_aurangabadkar@yahoo.com" wrote:
> how to export asp.net page to pdf
>
>