Package com.logicaldoc.parser
Class OCRUtil
- java.lang.Object
-
- com.logicaldoc.parser.OCRUtil
-
public class OCRUtil extends Object
Utility class for OCR interaction.- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description OCRUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Integer
getTextThreshold(String tenant)
static boolean
isEnabled()
Checks if the OCR is enabled and if the license feature is enabledstatic boolean
isOcrizable(String filename, Long fileSize, String tenant)
Checks if the given filename match the OCR's include/exclude policies and the file size is less than the configured max.static OCR
newOCR()
-
-
-
Method Detail
-
isEnabled
public static boolean isEnabled()
Checks if the OCR is enabled and if the license feature is enabled- Returns:
- the enabled status
-
isOcrizable
public static boolean isOcrizable(String filename, Long fileSize, String tenant)
Checks if the given filename match the OCR's include/exclude policies and the file size is less than the configured max. file size and of course if the OCR is enabled- Parameters:
filename
- name of the filefileSize
- size of the file in bytestenant
- name of the tenant- Returns:
- if the OCR can process the given filename
-
newOCR
public static OCR newOCR()
-
-