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
If you are calling createPDF instead of the pisaDocument method, you can use
pisa.CreatePDF(html.encode('UTF-8'), response, link_callback=fetch_resources, encoding='UTF-8')