Fixed UnicodeDecodeError in result pdf.