red team
Cracking PDF
John needs the PDF’s password-checking material in its own input format first:
pdf2john sample.pdf > out.txt
Then try the wordlist:
john --format=PDF --wordlist=rockyou.txt out.txt
john --show --format=PDF out.txt
This uses John the Ripper’s jumbo build. Depending on the package, the converter may be called pdf2john or pdf2john.pl; the upstream script also needs its accompanying libraries, so copying that file out of the repo on its own can be a dead end.
No password hashes loaded is an input or format problem, not evidence that the password is strong. Check that the conversion produced output and that your John build supports PDF. No password hashes left to crack is different: check --show, because John may already have the result in its pot file. The John FAQ explains both messages.