Hacker News new | ask | show | jobs
by jsrn 5425 days 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
1 comments

Thank you. Now I don't have to hate people who leave blank pages without the customary "This page intentionally left blank".