TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sathish Kumar
NA
55
12.6k
Export Data into PDF using iTextSharp
Sep 8 2015 9:41 AM
Hi frnds,
I'm using iTextSharp dll in my web applicaiton to export data into PDF. upto certain amt of data (5K records) there's not a problem.
but in my application there may be a (25K or more records) large data need to export. at the time it getting delay. The page has gone unresponsive.
The script of the page was stopped. Any one help me out for this problem,
My code is look like follows..
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition",
"attachment;filename=" + Request.QueryString["surveyName"].ToString() + ".pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
pnlExport
.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 0f);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
Note: pnlExport is the panel... which have the grid i bound the large data.
Reply
Answers (
1
)
How can I disable mdi form menu item except one menu item?
how to download toad for oracle 11g