by annowiki · 4y ago · 0 comments
with open('template.tex', 'rt') as f_in:
template = f_in.read()
template = template.replace('%PLACEHOLDER%', data)
fname = f'rendered-{dt.now().isoformat()}'
with open(fname, 'wt') as f_out:
f_out.write(template)
fileout = 'outdir'
subprocess.call(['pdflatex', '--output-directory', fileout, fname])No comments yet.