Better handling for showing pdfs