def _create_pdf(rendered_template, absolute_url):
    from weasyprint import HTML
    pdf_file = HTML(string=rendered_template, base_url=absolute_url).write_pdf()
    return pdf_file
def _create_pdf(rendered_template, absolute_url):
    from weasyprint import HTML
    pdf_file = HTML(string=rendered_template, base_url=absolute_url).write_pdf()
    return pdf_file