pretty print document text