Export asp.net page to pdf

S

sonali

Marius said:
You'll probably need to use a PDF-component.
Check these out:
http://www.411asp.net/home/assembly/document/pdf

Marius





Response.Clear()
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition",
"attachment;filename=exportpdf.pdf")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)

Dim tw As New System.IO.StringWriter()
Dim hw As New System.Web.UI.HtmlTextWriter(tw)

Dim frm As HtmlForm = New HtmlForm()
Me.Controls.Add(frm)
frm.Controls.Add(TABLE1)

'Me.Controls.Add(frm)
'frm.Controls.Add(Image1)
frm.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()


error with this code
can't able to save file as pdf
please suggest something
 
V

Vadivel Kumar

Sonali,

You can't export to PDF format as like other formats by using
ContentType etc., You need to use a PDF component to export from your
original format. PDF component knows how to make a PDF file by using
given text data.

Use the http://www.websupergoo.com/abcpdf-1.htm, if you get any error
while using the component, please elaborate the problem.
 
S

sonali

Vadivel said:
Sonali,

You can't export to PDF format as like other formats by using
ContentType etc., You need to use a PDF component to export from your
original format. PDF component knows how to make a PDF file by using
given text data.

Use the http://www.websupergoo.com/abcpdf-1.htm, if you get any error
while using the component, please elaborate the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top