Fix pdf filenames and viewing, emailing and downloading