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') | 			png_filename = pathlib.Path(tempfile.mkdtemp(), 'nahled.png') | ||||||
| 
 | 
 | ||||||
| 			subprocess.run([ | 			subprocess.run([ | ||||||
| 				"convert", | 				"gs", | ||||||
| 				"-density", "300x300", | 				"-sstdout=%stderr", | ||||||
| 				"-geometry", "{}x{}".format(VYSKA, sirka), | 				"-dSAFER", | ||||||
| 				"-background", "white", | 				"-dNOPAUSE", | ||||||
| 				"-flatten", | 				"-dBATCH", | ||||||
| 				"{}[0]".format(self.pdf.path),  # titulní strana | 				"-dNOPROMPT", | ||||||
| 				png_filename | 				"-sDEVICE=pngalpha", | ||||||
|  | 				"-r{}x{}".format(VYSKA, sirka), | ||||||
|  | 				"-dFirstPage=1d", | ||||||
|  | 				"-dLastPage=1d", | ||||||
|  | 				"-sOutputFile=" + str(png_filename), | ||||||
|  | 				"-f%s" % self.pdf.path | ||||||
| 				], | 				], | ||||||
| 				check=True, | 				check=True, | ||||||
| 				capture_output=True | 				capture_output=True | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jonas Havelka
						Jonas Havelka