Browse Source

Oprava bugu pri generovani stvrzenek

remotes/origin/korektury-ajax
parent
commit
7a4ea302a4
  1. 3
      seminar/views.py

3
seminar/views.py

@ -555,7 +555,8 @@ def soustredeniStvrzenkyExportView(request,soustredeni,first_num):
texfile.write(tex.decode("utf-8").encode("utf-8"))
shutil.copy(os.path.join(settings.STATIC_ROOT, 'seminar/stvrzenka.sty'),tempdir)
shutil.copy(os.path.join(settings.STATIC_ROOT, 'seminar/stvrzenky.tex'),tempdir)
subprocess.call(["pdfcslatex","stvrzenky.tex"],cwd = tempdir)
subprocess.call(["cslatex","stvrzenky.tex"],cwd = tempdir)
subprocess.call(["dvipdf","stvrzenky.dvi"],cwd = tempdir)
with open(tempdir+"/stvrzenky.pdf","rb") as pdffile:
response = HttpResponse(pdffile.read(),content_type='application/pdf')

Loading…
Cancel
Save