Fix convert to gs
This commit is contained in:
		
							parent
							
								
									aa8bb6dde4
								
							
						
					
					
						commit
						795ab34714
					
				
					 1 changed files with 12 additions and 7 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Jonas Havelka
						Jonas Havelka