Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Using itextsharp to generate pdf from asp.net

 
Thread Tools Search this Thread
Old 02-10-2004, 03:21 PM   #1
Default Using itextsharp to generate pdf from asp.net


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==?=
  Reply With Quote
Old 02-10-2004, 04:01 PM   #2
=?Utf-8?B?U3VyZXNo?=
 
Posts: n/a
Default RE: Using itextsharp to generate pdf from asp.net

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.
  Reply With Quote
Old 10-22-2007, 01:53 PM   #3
putty511
Junior Member
 
Join Date: Oct 2007
Posts: 2
Default

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
putty511 is offline   Reply With Quote
Old 06-19-2008, 11:25 AM   #4
roselin123
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

Quote:
Originally Posted by putty511
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


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
roselin123 is offline   Reply With Quote
Old 06-19-2008, 11:27 AM   #5
roselin123
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

Quote:
Originally Posted by roselin123
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


just for info i am using iTextSharp.
roselin123 is offline   Reply With Quote
Old 07-16-2008, 01:03 PM   #6
mfreidge
Junior Member
 
Join Date: Oct 2006
Posts: 3
Default Check the html file

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.
mfreidge is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump