![]() |
|
|
|||||||
![]() |
ASP Net - Using itextsharp to generate pdf from asp.net |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi,
I just started reading on http://itextsharp.sourceforge.net/tutorial/index.html and it seems like brillant. I would just like to know, has anyone worked in exporting a datagrid in pdf format. My objective is to pick a datagrid up and convert that into pdf format I really appreciate the time and efforts put to help programmers by these newsgroups, they are really great Thank Yo Sean =?Utf-8?B?U2Vhbg==?= |
|
|
|
|
#2 |
|
Posts: n/a
|
Yes, we have a guy at our company experimenting with this product now. So far from what I've been hearing from him is that it's really good. Best of all it's in process dll that can be easily used with .NET
I don't think it can convert datagrid as it is though. But it does convert html files into pdf. So you probably have to convert an html page with the datagrid in it Suresh. |
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2007
Posts: 2
|
Hello Mr.Suresh,
I need to convert a html table into pdf. But I am unable to do this. I get an error -- a blank pdf file is getting created.There is no content in it, Can u please help me out in this regard, It is very urgent and hence I would be very thankful for an early reply |
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Jun 2008
Posts: 2
|
Quote:
Hi all I am using the code below to generate a pdf file from an html file.I dont get any error in this code but the pdf file generated from this is blank/empty. I hv tried so many times but no help. Document test =new Document(); try { PdfWriter.GetInstance(test, new FileStream(Server.MapPath("test.pdf"), System.IO.FileMode.Create)); HtmlParser.Parse(test, Server.MapPath("test.html")); } } catch (Exception err) { Response.Write(err.StackTrace); Response.Write(err.Message); } Response.Redirect("http://localhost/WebRA/test.pdf"); pls help asap.its urgent. thanx |
|
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: Jun 2008
Posts: 2
|
Quote:
just for info i am using iTextSharp. |
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Oct 2006
Posts: 3
|
HtmlParser.Parse does NOT throw any error , but the pdf file generated from this could be blank/empty.
Debug output shows the messages from parser, if Html file has invalid structure. The post of Creating pdf in .NET from html (http://geekswithblogs.net/casualjim/...43.aspx#393262) has a lot of interesting comments, including suggestion to use HTML Agility Pack. |
|
|
|