Count the pages in a PDF
Select the PDF in Finder and press ⌘I — Get Info shows the page count under More Info. Spotlight knows it too: mdls -name kMDItemNumberOfPages prints it for any PDF Spotlight has indexed.
Without Terminal
- Select the PDF in Finder.
- Press ⌘I (Get Info).
- Open More Info — Pages is listed there.
In one command
Print the page count:
mdls -name kMDItemNumberOfPages report.pdf
mdls reads Spotlight’s index, so a PDF in a folder Spotlight skips shows (null) — Get Info still works.
Or just ask Titan
How many pages are in each PDF in my Downloads?Do it with Titan
Titan is an AI that lives on your computer: tell it what you need and it does it while you watch — you press Return, nothing runs by itself. What is Titan?
Titan isn’t on this computer yet. Get Titan, then press the button again — the task will be waiting, typed in.