How to Add Page number in Footer in PDF by Itextsharp
I am using iTextSharp DLL in ASP.NET code. I am fetching a data into dataset and Add the dataset into PDF table. If my dataset have more 100 rows then 100 rows will be added into PDF table and 3 or 4 page will be created in PDF file. How can I add the footer in each page? You need to inherit from PdfPageEventHelper class and override the methods shown in the code snippet below: Document doc = new Document(PageSize.A4.Rotate()); using (MemoryStream ms = new MemoryStream()) { PdfWriter writer = PdfWriter.GetInstance(doc, ms); PageEventHelper pageEventHelper = new PageEventHelper(); writer