Changed document to pdf format