How to get the total number of pages in a PDF?
Thanks for your inquiry. Aspose.Pdf.Kit for Java has a class named PdfFileInfo which contains a property named getNumberOfPages that can used to get the total number of pages in a PDF file.
PdfFileInfo fileInfo = new PdfFileInfo(“input.pdf”);
Please feel free to contact us for any further assistance.