Package com.logicaldoc.parser
Class OCRUtil
java.lang.Object
com.logicaldoc.parser.OCRUtil
Utility class for OCR interaction.
- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
getTextThreshold
(String tenant) static boolean
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 Details
-
isEnabled
public static boolean isEnabled()Checks if the OCR is enabled and if the license feature is enabled- Returns:
- the enabled status
-
isOcrizable
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
-
getTextThreshold
-
newOCR
-