I can see there are a lot of questions for getting the number of pages in a a pdf with C, PHP and others but am wondering with a batch file or cmd is there a simple way of getti
It might be helpful for new users. In the new version of PDFtk tool (above 2.0), use below command to get the number of pages of a PDF file:
pdftk file.pdf dump_data_annots output outputfile.txt
A new file will created at destination having content similar to below:
NumberOfPages: 6
Now read the file and manipulate the content as you want.