Class ImageOptions
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.ocr.ImageOptions
-
public class ImageOptions extends NativeObject
Options for OCR processing of images
These options control how images in the PDF document are processed during OCR.
-
-
Constructor Summary
Constructors Constructor Description ImageOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetDeskewScan()Whether to deskew scanned pages (Getter)ImageProcessingModegetMode()The mode for processing images (Getter)booleangetRemoveOnlyInvisibleOcrText()Whether to remove only invisible OCR text (text rendering mode 3) (Getter)booleangetRotateScan()Whether to rotate scanned pages based on detected orientation (Getter)voidsetDeskewScan(boolean value)Whether to deskew scanned pages (Setter)voidsetMode(ImageProcessingMode value)The mode for processing images (Setter)voidsetRemoveOnlyInvisibleOcrText(boolean value)Whether to remove only invisible OCR text (text rendering mode 3) (Setter)voidsetRotateScan(boolean value)Whether to rotate scanned pages based on detected orientation (Setter)-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getMode
public ImageProcessingMode getMode()
The mode for processing images (Getter)
Default value:ImageProcessingMode.NONE
-
setMode
public void setMode(ImageProcessingMode value)
The mode for processing images (Setter)
Default value:ImageProcessingMode.NONE- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getRotateScan
public boolean getRotateScan()
Whether to rotate scanned pages based on detected orientation (Getter)
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value:
false
-
setRotateScan
public void setRotateScan(boolean value)
Whether to rotate scanned pages based on detected orientation (Setter)
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value:
false
-
getDeskewScan
public boolean getDeskewScan()
Whether to deskew scanned pages (Getter)
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value:
false
-
setDeskewScan
public void setDeskewScan(boolean value)
Whether to deskew scanned pages (Setter)
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value:
false
-
getRemoveOnlyInvisibleOcrText
public boolean getRemoveOnlyInvisibleOcrText()
Whether to remove only invisible OCR text (text rendering mode 3) (Getter)
When used with
ImageProcessingMode.REPLACE_TEXTorImageProcessingMode.REMOVE_TEXT, only the invisible text layer typically added by OCR engines is removed, while other text is preserved.Default value:
false
-
setRemoveOnlyInvisibleOcrText
public void setRemoveOnlyInvisibleOcrText(boolean value)
Whether to remove only invisible OCR text (text rendering mode 3) (Setter)
When used with
ImageProcessingMode.REPLACE_TEXTorImageProcessingMode.REMOVE_TEXT, only the invisible text layer typically added by OCR engines is removed, while other text is preserved.Default value:
false
-
-