I'd like to count words on a PDF file on OS X. The inspector doesn't contain the word count.

  • Keep in mind that many PDF files are collections of images not of text so the word count would be 0 or very low. – Dave Nelson Sep 12 '16 at 11:50
  • One possibility is to attempt to export the PDF to text, and do the word count there. This is actually also what one would do using Acrobat. – Max Wyss Sep 12 '16 at 20:02

Use the built-in tool ps2ascii,

$ ps2ascii MSWiM_2016.pdf | wc -w
*** Warning: composite font characters dumped without decoding.
  • tried to use ps2ascii command on my laptop running High Sierra (10.13.6) and terminal returned -bash: ps2ascii: command not found. – Heidi B Harley Jan 22 '19 at 22:12
  • Same here – tried which ps2ascii on Mojave (10.14.5) and got nothing. – Alex Ryan Nov 9 '19 at 0:49
  • @HeidiBHarley @AlexRyan, try pip install ps2ascii. – SparkAndShine Feb 19 at 7:32

I put together a small GUI app "PDF Word Counter", which returns the word count for inputted PDF files. It has no advantage over the other answer (ps2ascii) in terms of the word count returned, but it can be a good solution for those people who don't like to use the command line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .