Class PaddleOcrInitException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.itextpdf.commons.exceptions.ITextException
com.itextpdf.pdfocr.exceptions.PdfOcrException
com.itextpdf.pdfocr.onnx.exceptions.PaddleOcrInitException
All Implemented Interfaces:
Serializable

public class PaddleOcrInitException extends PdfOcrException
Exception class for exceptions during PaddleOCR initialization.
See Also:
  • Constructor Details

    • PaddleOcrInitException

      protected PaddleOcrInitException (String message)
      Creates new PaddleOcrInitException instance.
      Parameters:
      message - exception message
  • Method Details

    • boxTypeIsNotSupported

      public static PaddleOcrInitException boxTypeIsNotSupported()
      Creates an exception for cases, when the detection model does not return quads.
      Returns:
      the created exception
    • channelFirstIsNotSupported

      public static PaddleOcrInitException channelFirstIsNotSupported()
      Creates an exception to assert channel_first is set to false.
      Returns:
      the created exception
    • imageShapeIsNotSupported

      public static PaddleOcrInitException imageShapeIsNotSupported()
      Creates an exception for cases, when the detection model uses an unsupported method for resizing input images.
      Returns:
      the created exception
    • preProcessorOperationMissing

      public static PaddleOcrInitException preProcessorOperationMissing (String name)
      Creates an exception for cases, when an expected pre-processing operation is missing in the configuration file.
      Parameters:
      name - name of the missing pre-processing operation
      Returns:
      the created exception
    • scoreModeIsNotSupported

      public static PaddleOcrInitException scoreModeIsNotSupported()
      Creates an exception for cases, when the detection model uses an unsupported score calculation method.
      Returns:
      the created exception
    • unexpectedMeanChannelCount

      public static PaddleOcrInitException unexpectedMeanChannelCount (int expectedCount)
      Creates an exception for cases, when the size of the array of means for normalization has an unexpected size.
      Parameters:
      expectedCount - expected size of the array
      Returns:
      the created exception
    • unexpectedPostProcessorType

      public static PaddleOcrInitException unexpectedPostProcessorType (String name)
      Creates an exception for cases, when an unexpected post-processor is specified in the configuration file.
      Parameters:
      name - name of the post-processor that was found
      Returns:
      the created exception
    • unexpectedStdChannelCount

      public static PaddleOcrInitException unexpectedStdChannelCount (int expectedCount)
      Creates an exception for cases, when the size of the array of standard deviations for normalization has an unexpected size.
      Parameters:
      expectedCount - expected size of the array
      Returns:
      the created exception
    • useDilationIsNotSupported

      public static PaddleOcrInitException useDilationIsNotSupported()
      Creates an exception for cases, when the detection model uses an unsupported pre-processing step for input images.
      Returns:
      the created exception