Fixing UnicodeError in html_pdf.