Package com.itextpdf.pdfocr.tesseract4
Enum TextPositioning
- All Implemented Interfaces:
-
Serializable
,Comparable<TextPositioning>
,java.lang.constant.Constable
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
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionText will be located by lines retrieved from hocr file.Text will be located by words retrieved from hocr file.Similar to BY_WORDS mode, but top and bottom of word BBox are inherited from line. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextPositioning
Returns the enum constant of this type with the specified name.static TextPositioning[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BY_LINES
Text will be located by lines retrieved from hocr file. (default value) -
BY_WORDS
Text will be located by words retrieved from hocr file. -
BY_WORDS_AND_LINES
Similar to BY_WORDS mode, but top and bottom of word BBox are inherited from line.
-
-
Method Details
-
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
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
-