public class OcrOptions extends Object
| Constructor and Description |
|---|
OcrOptions()
Initializes a new instance of the
OcrOptions class with default values. |
OcrOptions(OcrEventHandler handler)
Initializes a new instance of the
OcrOptions class with OcrEventHandler object. |
OcrOptions(PagePreviewOptions pagePreviewOptions)
Initializes a new instance of the
OcrOptions class with page preview options. |
OcrOptions(Rectangle rectangle)
Initializes a new instance of the
OcrOptions class with rectangular area. |
OcrOptions(Rectangle rectangle,
OcrEventHandler handler)
Initializes a new instance of the
OcrOptions class with rectangular area and OcrEventHandler object. |
OcrOptions(Rectangle rectangle,
OcrEventHandler handler,
boolean useSpellCheker)
Initializes a new instance of the
OcrOptions class. |
| Modifier and Type | Method and Description |
|---|---|
OcrEventHandler |
getHandler()
Gets the event handler to catch OCR events.
|
Language |
getLanguage()
Gets the language used for optical character recognition.
|
PagePreviewOptions |
getPagePreviewOptions()
Gets the page preview options used to render the page that is fed to the OCR engine.
|
Rectangle |
getRectangle()
Gets the rectangular area that constraints the page area which is used for text recognizing.
|
boolean |
getUseSpellChecker()
Gets the value that indicates whether the spell checker is used.
|
void |
setHandler(OcrEventHandler handler)
Sets the event handler to catch OCR events.
|
void |
setLanguage(Language language)
Sets the language used for optical character recognition.
|
void |
setPagePreviewOptions(PagePreviewOptions pagePreviewOptions)
Sets the page preview options used to render the page that is fed to the OCR engine.
|
void |
setRectangle(Rectangle rectangle)
Sets the rectangular area that constraints the page area which is used for text recognizing.
|
void |
setUseSpellChecker(boolean useSpellChecker)
Sets the value that indicates whether the spell checker is used.
|
public OcrOptions()
OcrOptions class with default values.public OcrOptions(Rectangle rectangle)
OcrOptions class with rectangular area.rectangle - The rectangular area that constraints the page area which is used for text recognizing.public OcrOptions(PagePreviewOptions pagePreviewOptions)
OcrOptions class with page preview options.pagePreviewOptions - The options used to render the page preview which is fed to the OCR engine.public OcrOptions(OcrEventHandler handler)
OcrOptions class with OcrEventHandler object.handler - An instance of OcrEventHandler to catch OCR events.public OcrOptions(Rectangle rectangle, OcrEventHandler handler)
OcrOptions class with rectangular area and OcrEventHandler object.rectangle - The rectangular area that constraints the page area which is used for text recognizing.handler - An instance of OcrEventHandler to catch OCR events.public OcrOptions(Rectangle rectangle, OcrEventHandler handler, boolean useSpellCheker)
OcrOptions class.rectangle - The rectangular area that constraints the page area which is used for text recognizing.handler - An instance of OcrEventHandler to catch OCR events.useSpellCheker - The value that indicates whether the spell checker is used.public Rectangle getRectangle()
Rectangle class that represents the rectangular area that constraints
the page area which is used for text recognizing; null if it isn't set.public OcrEventHandler getHandler()
OcrEventHandler class which is used to catch OCR events.public boolean getUseSpellChecker()
true if the spell checker is used; otherwise, false.public PagePreviewOptions getPagePreviewOptions()
PagePreviewOptions, or null if not set.public void setPagePreviewOptions(PagePreviewOptions pagePreviewOptions)
pagePreviewOptions - The page preview options.public Language getLanguage()
Language enum value. Defaults to Language.Eng.public void setLanguage(Language language)
language - The Language enum value.public void setRectangle(Rectangle rectangle)
rectangle - The rectangle, or null to scan the whole page.public void setHandler(OcrEventHandler handler)
handler - The event handler.public void setUseSpellChecker(boolean useSpellChecker)
useSpellChecker - true to enable spell checking.Copyright © 2026. All rights reserved.