We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utf8 characters like umlauts (öäü) are not rendered correctly... maybe an encoding problem
The text was updated successfully, but these errors were encountered:
something like this fixes it:
def transform_to_pdf(response): import codecs content = codecs.BOM_UTF8 + response.content response['mimetype'] = 'application/pdf' response['Content-Disposition'] = 'attachment; filename=report.pdf' result = StringIO.StringIO() pdf = pisa.pisaDocument(StringIO.StringIO(content), result, link_callback=fetch_resources) response.write(result.getvalue()) if not pdf.err: return response else: return HttpResponse("We had some errors<pre>%s</pre>" % pdf.err)
Sorry, something went wrong.
No branches or pull requests
utf8 characters like umlauts (öäü) are not rendered correctly... maybe an encoding problem
The text was updated successfully, but these errors were encountered: