PDFPageCount Use this function to get the number of pages of the PDF document. To use int count = PDFPageCount();