holiveira
holiveira

Reputation: 4515

How do I convert a web page to PDF in ASP.NET?

I have a webpage with some data in a table and I would like to offer my users the option to download it as a PDF File, how can I do that in ASP.Net?

Upvotes: 1

Views: 655

Answers (5)

Jan Blaha
Jan Blaha

Reputation: 3095

If you are using asp.net mvc and want to convert result from mvc views into pdf. You can look at this blog post.

If you are considering to print complex pdf reports from c#. You can check out this blog post.

Disclaimer: I am the author of jsreport.

Upvotes: 0

jle
jle

Reputation: 9479

wkhtmltopdf works great and uses the webkit rendering engine (Safari, Chrome) instead of a cooked up html/css parser.

The benefit is that you simply give it your url and it returns a pdf. You would just need to make a printer friendly version of the page to send to it.

Upvotes: 1

mgcm
mgcm

Reputation: 125

Take a look at the iTextSharp library.

Upvotes: 1

JasonS
JasonS

Reputation: 23868

You can also use the MS ReportViewer control and render your PDF from code if you don't want the actual viewer on the page.

Upvotes: 0

J.W.
J.W.

Reputation: 18181

  1. You can use a report generator like sql report or crystal report to generate the pdf file.
  2. You can use third party pdf generate tool , and use it to generate a pdf in memory, and sent it to client use Response.Write.

Upvotes: 0

Related Questions