Export asp.net page to pdf

  • Thread starter Thread starter sonali
  • Start date Start date
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
 
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.
 
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

Back
Top