I am using ItextSharp for creating Pdf in my application. When the user clicks on submit the pdf is generated on the fly and displayed to the user. The problem am facing is i am not able to display the total number of pages present in that pdf. I am using an image as a header and in footer am again using an image, i don't want to display the page number in the footer as per the requirements. So i want something like
"Total number of pages: 2(pages present in that pdf)" on the first page of my pdf. Is it possible to do this Please suggest something.
//Create instance for the PDF reader
PdfReader pdf_fie = new PdfReader(filepath);
//read it's pagecount
page_count = pdf_fie.NumberOfPages;
//close the file
pdf_fie.Close();