|
|
@ -602,13 +602,18 @@ class Cislo(SeminarModelBase): |
|
|
|
png_filename = pathlib.Path(tempfile.mkdtemp(), 'nahled.png') |
|
|
|
|
|
|
|
subprocess.run([ |
|
|
|
"convert", |
|
|
|
"-density", "300x300", |
|
|
|
"-geometry", "{}x{}".format(VYSKA, sirka), |
|
|
|
"-background", "white", |
|
|
|
"-flatten", |
|
|
|
"{}[0]".format(self.pdf.path), # titulní strana |
|
|
|
png_filename |
|
|
|
"gs", |
|
|
|
"-sstdout=%stderr", |
|
|
|
"-dSAFER", |
|
|
|
"-dNOPAUSE", |
|
|
|
"-dBATCH", |
|
|
|
"-dNOPROMPT", |
|
|
|
"-sDEVICE=pngalpha", |
|
|
|
"-r{}x{}".format(VYSKA, sirka), |
|
|
|
"-dFirstPage=1d", |
|
|
|
"-dLastPage=1d", |
|
|
|
"-sOutputFile=" + str(png_filename), |
|
|
|
"-f%s" % self.pdf.path |
|
|
|
], |
|
|
|
check=True, |
|
|
|
capture_output=True |
|
|
|