Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

convert html page to pdf using asp.net

Posted on 2009-02-19
6
Medium Priority
?
620 Views
Last Modified: 2012-05-06
hi,
I have designed reporting system in asp.net, vb.net .. now what I want to do is that to convert entire aspx page (which represent the report to pdf file), in otherword, I want to have a button on page, and when the user click it, then this page would be converted to pdf directly containg all html inside this page (which represent the report)
can anyone help me how to do this (even if there is a component which might help) ?
0
Comment
Question by:Ameerh24
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:jmwheeler
ID: 23686027
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 23688627
Hi Ameerh24,
Currently i'm using HTML2Pdf components for that pdf generation from HTML page and it's free and easy to use. Check this for more details.
http://www.codeproject.com/KB/aspnet/HTML2PDF.aspx
0
 

Author Comment

by:Ameerh24
ID: 23689816
x_com,
the code attached in code project is not working, it returns many errors because of conversion from framework 1.1 to 2.0,

Error      1      'ASP.displaypdf_aspx.GetTypeHashCode()': no suitable method found to override      c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\htmltopdf\cd56b670\b37ff61\App_Web_2r7vmafr.0.cs      429      

Error      2      'ASP.displaypdf_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override      c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\htmltopdf\cd56b670\b37ff61\App_Web_2r7vmafr.0.cs      434      

Error      3      'ASP.displaypdf_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable'      c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\htmltopdf\cd56b670\b37ff61\App_Web_2r7vmafr.0.cs      152      
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ameerh24
ID: 23689818
can you please just try it in your machine ?
0
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 1500 total points
ID: 23708277
Hi Ameerh24,
The previous solution is working under framework 1.1.  
You can use itextsharp components if you're looking the components that support in framework 2.0.
http://imak47.wordpress.com/2008/09/19/generating-pdf-document-in-net-using-itextsharp-library/ 

Download link:
http://sourceforge.net/projects/itextsharp/
0
 

Author Closing Comment

by:Ameerh24
ID: 31548953
it works
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question