Class OCRUtil


  • public class OCRUtil
    extends Object
    Utility class for OCR interaction.
    Since:
    6.0
    Author:
    Marco Meschieri - LogicalDOC
    • Field Detail

      • isTesting

        public static boolean isTesting
    • Constructor Detail

      • OCRUtil

        public OCRUtil()
    • 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 file
        fileSize - size of the file in bytes
        tenant - name of the tenant
        Returns:
        if the OCR can process the given filename
      • getTextThreshold

        public static float getTextThreshold​(String tenant)
      • newOCR

        public static OCR newOCR()