Updated pdf.php

Pretty much based on viewer.html, bumping this as well.