Cloned from https://code.google.com/p/open-pdf-presenter/ with some changes.