I\'m trying to generate a pdf from template using this snippet:
def write_pdf(template_src, context_dict): template = get_template(template_src) context
This does work for me:
pdf = pisa.pisaDocument(StringIO.StringIO(html.encode("UTF-8")), result, encoding='UTF-8')