mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Fix klafy horrors
This commit is contained in:
parent
5a83a577fa
commit
09da1b4d43
1 changed files with 6 additions and 7 deletions
|
@ -110,13 +110,12 @@ def create_pdf(template, ctx={}):
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as tempdir:
|
with tempfile.TemporaryDirectory() as tempdir:
|
||||||
for _ in range(2):
|
for _ in range(2):
|
||||||
with open("/var/www/re2o/out.log", "w") as f:
|
process = Popen(
|
||||||
process = Popen(
|
["pdflatex", "-output-directory", tempdir],
|
||||||
["pdflatex", "-output-directory", tempdir],
|
stdin=PIPE,
|
||||||
stdin=PIPE,
|
stdout=PIPE,
|
||||||
stdout=f, # PIPE,
|
)
|
||||||
)
|
process.communicate(rendered_tpl)
|
||||||
process.communicate(rendered_tpl)
|
|
||||||
with open(os.path.join(tempdir, "texput.pdf"), "rb") as f:
|
with open(os.path.join(tempdir, "texput.pdf"), "rb") as f:
|
||||||
pdf = f.read()
|
pdf = f.read()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue