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 SummaryModifier and TypeMethodDescriptionstatic floatgetTextThreshold(String tenant) static booleanChecks if the OCR is enabled and if the license feature is enabledstatic booleanisOcrizable(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 OCRnewOCR()
- 
Method Details- 
isEnabledpublic static boolean isEnabled()Checks if the OCR is enabled and if the license feature is enabled- Returns:
- the enabled status
 
- 
isOcrizableChecks 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 file
- fileSize- size of the file in bytes
- tenant- name of the tenant
- Returns:
- if the OCR can process the given filename
 
- 
getTextThreshold
- 
newOCR
 
-