mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: Add a warning about a low image DPI which may cause OCR to fail (#4708)
This commit is contained in:
		| @@ -244,6 +244,10 @@ class RasterisedDocumentParser(DocumentParser): | |||||||
|                     f"no DPI information is present in this image and " |                     f"no DPI information is present in this image and " | ||||||
|                     f"OCR_IMAGE_DPI is not set.", |                     f"OCR_IMAGE_DPI is not set.", | ||||||
|                 ) |                 ) | ||||||
|  |             if ocrmypdf_args["image_dpi"] < 70:  # pragma: no cover | ||||||
|  |                 self.log.warning( | ||||||
|  |                     f"Image DPI of {ocrmypdf_args['image_dpi']} is low, OCR may fail", | ||||||
|  |                 ) | ||||||
|  |  | ||||||
|         if settings.OCR_USER_ARGS and not safe_fallback: |         if settings.OCR_USER_ARGS and not safe_fallback: | ||||||
|             try: |             try: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H