Home

PDF word count

Get the word count of a PDF, minus the last page to allow for references

pdftotext -l $(pdfinfo "File.pdf" | grep Pages | awk '{print $2-1}') "File.pdf" -| wc -w 

Replace File.pdf with the name of your file