Compile the tool by running
Then, just run
./pdfjpg <pdf file> <jpg file> <output file>
to generate a file which is both a PDF and a JPG file. See PoC||GTFO 0x03 for more details.
Acrobat Reader since version 10 cannot open the resulting PDF.