Click here to Skip to main content
11,704,509 members (61,224 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
How to get the page number in pdf file using iTextSharp in using C#
Posted 23-Nov-12 0:58am
Krunal R at 23-Nov-12 8:02am
Have you tried this : e.FooterText = writer.CurrentPageNumber.ToString(); ???
Plyswthsqurles at 23-Nov-12 10:22am
Are you looking for a specific string on one of the PDF pages and want to get the page number of that string? If so i've got a code snippet i can post but will only do so if that is what you are looking for. Otherwise your question is not clear.
Killzone DeathMan at 26-Nov-12 5:20am
Maybe this can help you a little:

PdfReader reader = new iTextSharp.text.pdf.PdfReader("filePath/To/the/PDF/Page.pdf");
int NumberOfPages = reader.NumberOfPages;

if you want some help using iTextSharp, here's my email:

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 738
1 OriginalGriff 495
2 Andy Lanng 275
3 CPallini 242
4 Maciej Los 235
0 OriginalGriff 8,824
1 Sergey Alexandrovich Kryukov 8,247
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,606

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 23 Nov 2012
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