C# .NET - How to add footer in existing pdf -iTextSharp

Asked By Rahul Khanna on 22-Dec-13 10:35 AM
I have been trying to figure out if it is possible to add a footer to an existing PDF document.  Every example I have seen is for adding a footer to a document that has just been created using PDFWriter as opposed to getting a document using PDFReader and then adding a footer to it.  Does anyone know of a way that a footer can be added to an existing PDF?  Thanks.
alex smith replied to Rahul Khanna on 21-Jul-14 04:20 AM
hello,

theck out this way :

//create a new instance of pdf document and load an exsiting pdf file
 PdfDocument doc = new PdfDocument();
 doc.LoadFromFile(@"..\sample.pdf");
//draw footer image 
PdfImage footerImage = PdfImage.FromFile(@"..\watermark_bg.JPG");     
y = doc.Pages[0].Size.Height - footerImage.PhysicalDimension.Height;
PointF footerLocation = new PointF(margin.Left, y);
doc.Pages[0].Canvas.SetTransparency(0.5f);
doc.Pages[0].Canvas.DrawImage(footerImage, footerLocation);

More details about this method refer - http://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/PDF-Footer-Add-PDF-Footer-in-C-VB.NET.html