Zeichenfehler Standardsdrucken
This commit is contained in:
parent
ecd5d7e269
commit
232a225416
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue