954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

convert to pdf

Hi experts,

I've been researching about convert an aspx to pdf but nothing seems to help me.
I found crystal reports but my layout is not just gridview only.

In my aspx, it includes textboxes, labels, tables, gridview. I need to print them to a pdf format automatically.

Due to the limited resources, I can't download the softwares available.

I saw codes like
PdfConverter pdfConverter = new PdfConverter();

(link is http://www.html-to-pdf.net/Support.aspx#csharp )

I tried them but it don't work. What are some other ways I can do?

Thanks in advance.

dotNetDummi
Junior Poster in Training
53 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

you'd have to download those tools or purchase them. I don't know of a particular method or free tool that will allow you to do that...

alc6379
Cookie... That's it
Team Colleague
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
 

First, Thanks for your reply.

oh oh(I have to convince my client to buy the software)...

Erm, is there any other methods to convert these web widgets into some format that is not editable, (I can't use ms word etc)

dotNetDummi
Junior Poster in Training
53 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

I can't think of anything offhand. Everything I might be able to think of is available as a commercial product...

alc6379
Cookie... That's it
Team Colleague
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
 

I placed on the page the button and the panel wich contains data for pdf. The code of btnConvert_Click event was next:

Dim objStringWriter As New System.IO.StringWriter
Dim objHTMLWriter As New HtmlTextWriter(objStringWriter)
Panel1.RenderControl(objHTMLWriter)
Dim htmldata As String = objStringWriter.ToString()

For converting page content to the PDF try to use PDF Duo .Net component ( download this ASP.NET component ).
Then it is easy to convert string "htmldata" to PDF with next code:

conv.OpenHTML(htmldata)
conv.SavePDF("example.pdf")
DuoDimension
Newbie Poster
4 posts since Jun 2009
Reputation Points: 8
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You