How to retain the PDF format?