texml = BytesIO(rendered.encode('utf-8'))
tempdir = mkdtemp(prefix="render_to_pdf-")
tex_path = os.path.join(tempdir, "doc.tex")
texml = BytesIO(rendered.encode('utf-8'))
tempdir = mkdtemp(prefix="render_to_pdf-")
tex_path = os.path.join(tempdir, "doc.tex")