Package com.pdftools.ocr
Enum ImageProcessingMode
- java.lang.Object
-
- java.lang.Enum<ImageProcessingMode>
-
- com.pdftools.ocr.ImageProcessingMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ImageProcessingMode>
public enum ImageProcessingMode extends java.lang.Enum<ImageProcessingMode>
The mode for processing images in OCR
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IF_NO_TEXTProcess images only if the document contains no text at all.NONEDo not process images.REMOVE_TEXTRemove existing OCR text without performing new OCR.REPLACE_TEXTProcess all images and remove existing OCR text.UPDATE_TEXTOnly process images that have no OCR text.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageProcessingModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ImageProcessingMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ImageProcessingMode NONE
Do not process images.
-
UPDATE_TEXT
public static final ImageProcessingMode UPDATE_TEXT
Only process images that have no OCR text. This is the recommended mode to make scanned pages searchable while preserving existing OCR text.
-
REPLACE_TEXT
public static final ImageProcessingMode REPLACE_TEXT
Process all images and remove existing OCR text. Use this mode to re-OCR all images, replacing any previously generated text.
-
REMOVE_TEXT
public static final ImageProcessingMode REMOVE_TEXT
Remove existing OCR text without performing new OCR. This mode does not require an OCR engine.
-
IF_NO_TEXT
public static final ImageProcessingMode IF_NO_TEXT
Process images only if the document contains no text at all.
-
-
Method Detail
-
values
public static ImageProcessingMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageProcessingMode c : ImageProcessingMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageProcessingMode valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-