Enum TextPositioning

java.lang.Object
java.lang.Enum<TextPositioning>
com.itextpdf.pdfocr.tesseract4.TextPositioning
All Implemented Interfaces:
Serializable, Comparable<TextPositioning>, java.lang.constant.Constable

public enum TextPositioning extends Enum<TextPositioning>
Enumeration of the possible types of text positioning. It is used when there is possibility in selected Reader to process the text by lines or by words and to return coordinates for the selected type of item. For tesseract this value makes sense only if selected OutputFormat is OutputFormat.HOCR.
  • Enum Constant Details

    • BY_LINES

      public static final TextPositioning BY_LINES
      Text will be located by lines retrieved from hocr file. (default value)
    • BY_WORDS

      public static final TextPositioning BY_WORDS
      Text will be located by words retrieved from hocr file.
    • BY_WORDS_AND_LINES

      public static final TextPositioning BY_WORDS_AND_LINES
      Similar to BY_WORDS mode, but top and bottom of word BBox are inherited from line.
  • Method Details

    • values

      public static TextPositioning[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TextPositioning valueOf (String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null