mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	change tesseract parser to only convert first page to save (potentially) massive amounts of work
This commit is contained in:
		
							parent
							
								
									939a67bd4b
								
							
						
					
					
						commit
						cac63494f0
					
				@ -50,10 +50,11 @@ class RasterisedDocumentParser(DocumentParser):
 | 
				
			|||||||
            self.CONVERT,
 | 
					            self.CONVERT,
 | 
				
			||||||
            "-scale", "500x5000",
 | 
					            "-scale", "500x5000",
 | 
				
			||||||
            "-alpha", "remove",
 | 
					            "-alpha", "remove",
 | 
				
			||||||
            self.document_path, os.path.join(self.tempdir, "convert-%04d.png")
 | 
					            "{}[0]".format(self.document_path),
 | 
				
			||||||
 | 
					            os.path.join(self.tempdir, "convert.png")
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return os.path.join(self.tempdir, "convert-0000.png")
 | 
					        return os.path.join(self.tempdir, "convert.png")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _is_ocred(self):
 | 
					    def _is_ocred(self):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user