Page X of Y issue

Your second way is probably the simplest way. Below is a very, very slimmed down but working version: public class MyPdfPageEventHelpPageNo : iTextSharp.text.pdf.PdfPageEventHelper { public override void OnEndPage(PdfWriter writer, Document document) { ColumnText.ShowTextAligned(writer.DirectContent, Element.ALIGN_CENTER, new Phrase(writer.PageNumber.ToString()), 500, 140, 0); } } And to use it: //Create a file on our desktop string outputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), … Read more

Extract images using iTextSharp

I found that my problem was that I was not recursively searching inside of forms and groups for images. Basically, the original code would only find images that were embedded at the root of the pdf document. Here is the revised method plus a new method (FindImageInPDFDictionary) that recursively searches for images in the page. … Read more