Zeichenfehler Standardsdrucken

This commit is contained in:
holger.trampe 2020-12-16 22:36:39 +01:00
parent ecd5d7e269
commit 232a225416
1 changed files with 1 additions and 1 deletions

View File

@ -852,7 +852,7 @@ from xhtml2pdf import pisa
# Utility function
def convert_html_to_pdf(source_html, output_filename):
result = BytesIO()
pdf = pisa.pisaDocument(BytesIO(source_html.encode("ISO-8859-1")), result)
pdf = pisa.pisaDocument(BytesIO(source_html.encode("UTF-8")), result)
if not pdf.err:
return HttpResponse(result.getvalue(), content_type='application/pdf')
return None