23 ms·
"[...] but it doesn't have an -i or --info option that tells me how many pages a PDF file has" You could use pdfinfo - in Debian / Ubuntu, it is in the same pa
by jsrn 15y ago
"[...] but it doesn't have an -i or --info option that tells me how many pages a PDF file has"
You could use pdfinfo - in Debian / Ubuntu, it is in the same package as pdftotext (poppler-utils).
To extract (only) the number of pages of a PDF:
$ pdfinfo FILE.pdf | grep '^Pages' | tr -s ' ' | cut -d ' ' -f 2
- mahmud 15y agoThank you. Now I don't have to hate people who leave blank pages without the customary "This page intentionally left blank".