Got it. So if I want to hack anything, check if it can open PDF files first.
Re security, there are many pdf viewers, so the rewrites exist, and some of them do not have the js execution engine and all that jazz that opens up all sorts of potential exploits.