Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
LaTeX macro to obfuscate text as an image (to prevent selecting, parsing, ...)
\global\advance\@imagecount 1
\immediate\write18{echo '\unexpanded{\font\1=}\fontname\font' > \x.tex}%
\immediate\write18{echo '\unexpanded{\1#1\nopagenumbers\bye}' >> \x.tex}%
\immediate\write18{pdftex \x.tex}%
\immediate\write18{pdf2ps -dNoOutputFonts \x.pdf \}
\immediate\write18{ps2pdf \ \x.pdf}
\immediate\write18{pdfcrop --hires \x.pdf \x.pdf}
\immediate\write18{rm image-\the\@imagecount.*}%

This comment has been minimized.

Copy link
Owner Author

@maleadt maleadt commented Mar 27, 2015

Note that this requires passig --shell-escape to pdflatex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.