List all fonts in directory's PDF files

Someone at work asked if we could search through our platemaking files to see what were the most popular fonts used each month. Wouldn’t that be something fun to share? “Trending letterpress fonts.” So this of course called for a command-line one-liner:

find . -type f -iname '*.pdf' -exec pdffonts {} \;|sed -E 's/^[A-Z]+\+//g'|grep -o '^[A-Z].*'|grep -o '^[-,A-Za-z]*'|grep -e '^$' -v

I’m going to guess there are more elegant ways to do this, but there you go: it appears to work. At some point I may get the time to feed this into a database to post online, so I’m leaving it here just so I don’t have to perform those mental acrobatics again. Note that pdffonts in in the Debian poppler-utils package and is also available for Mac via Homebrew‘s poppler package.