Converts incoming documents into a PDF that is a sequence of filtered/optimised images. Dangerzone will also handle office docs, epub, and a lot of different image formats (e.g. SVG and others that can possibly contain active content).
Sandboxes don't have network access, so if a malicious document can compromise one, it can't phone home
With a combo CSS, HTML, JS it is networkable from localhost.
(those are the only ones I have installed right now, I think)
Or there's poppler-utils which contains a bunch of tools for dealing with PDF files. You might be able to write a script which uses them to extract the contents into a safe format (maybe even a different PDF file?).
Here you go: https://blog.invisiblethings.org/2013/02/21/converting-untru...