You need to convert to export the hash to an appropriate format first:

pdf2john sample.pdf > out.txt

Then crack as usual:

john out.txt --format=PDF -wordlist=rockyou.txt