Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET PDF
Hi ,
How to append a page to existing pdf using,
i used the following code.
Document doc = new Document();
but old page is replacing with new content.But i need just append of data to existing pdf, i.e if the pdf contains 2 pages,if i want to add the data then 3rd page should be created and content should be fall in 3rd page only.
Posted 2-May-11 3:23am
Edited 2-May-11 6:21am
Manfred R. Bihy at 2-May-11 9:42am
What library are you talking about?
Add more details please!
kirangadu at 3-May-11 0:01am
Hi..this is my function which i am using.
i am using iTextSharp namespace,
protected void Button1_Click(object sender, EventArgs e)
string newFile = @"C:\Mydata\t5.pdf";

iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader(@"C:\Mydata\t5.pdf");
Document doc = new Document();
//string no = reader.NumberOfPages.ToString();
//int no2 = Convert.ToInt32(no);
iTextSharp.text.pdf.PdfWriter writer = iTextSharp.text.pdf.PdfWriter.GetInstance(doc, new FileStream(newFile, FileMode.Create));
for (int i = 1; i < 3; i++)

doc.Add(new Paragraph(TextBox2.Text));


1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 472
1 Maciej Los 355
2 Sergey Alexandrovich Kryukov 346
3 CPallini 140
4 PIEBALDconsult 138
0 Sergey Alexandrovich Kryukov 6,708
1 OriginalGriff 5,302
2 Peter Leow 3,837
3 Mika Wendelius 2,850
4 CHill60 2,748

Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 20 Jul 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100