mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	fix logging getting spammed with pdfminer warnings on JPG files
This commit is contained in:
		| @@ -214,8 +214,12 @@ class RasterisedDocumentParser(DocumentParser): | |||||||
|         # This forces tesseract to use one core per page. |         # This forces tesseract to use one core per page. | ||||||
|         os.environ['OMP_THREAD_LIMIT'] = "1" |         os.environ['OMP_THREAD_LIMIT'] = "1" | ||||||
|  |  | ||||||
|         text_original = self.extract_text(None, document_path) |         if mime_type == "application/pdf": | ||||||
|         original_has_text = text_original and len(text_original) > 50 |             text_original = self.extract_text(None, document_path) | ||||||
|  |             original_has_text = text_original and len(text_original) > 50 | ||||||
|  |         else: | ||||||
|  |             text_original = None | ||||||
|  |             original_has_text = False | ||||||
|  |  | ||||||
|         if settings.OCR_MODE == "skip_noarchive" and original_has_text: |         if settings.OCR_MODE == "skip_noarchive" and original_has_text: | ||||||
|             self.log("debug", |             self.log("debug", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler