Generate PDF document with secret GPG keys or revocation certificates using pdflatex.
Credits goes to @costrouc.
Example usage:
pdflatex -shell-escape "\\def\gptitle{Master Key}\\def\gpkeyfinger{478122ED}\\def\gpfile{data.bin}\\include{gpg2paper}"
The data.bin file contains your secret data or any other data you wish to backup. It can contain the output of
gpg --output data.bin --export-secret-key [YOURKEYID]
but it's recommended to use paperkey utility to extract only secret data. It will produce less bytes to backup and make QR codes less dense.
Remember to destory your printer afterwards, preferably with 🔥!
Example output: