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
Sanket Jain
NA
855
140.8k
How to insert new page in PDF with itextSharp
Dec 20 2014 5:56 AM
I have 2 tables in my form. I am generating PDF file with the help of itextsharp.dll
I want to break the page when 2nd table is started but it can't work right now
I inserted 2 tables in panel & write following code
*******************************************************************************************
Response.AddHeader("content-disposition", "attachment;filename=Report.pdf");
Response.ContentType = "application/pdf";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
panelPrint.RenderControl(htmlWrite);
System.IO.StringReader sr = new System.IO.StringReader(stringWrite.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 7f);
//Document pdfDoc = new Document(
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
***********************************************************************************************
So please tell me how to break that page when 2nd table is started?
Reply
Answers (
8
)
How to Call Button Event When my Web Page is Idle 4 Five Min
Eliminate duplicate value from table using joins.