COcr library
ExtractText
Section titled “ExtractText”Extracts bulk text from an image (up to 4K (4096) characters)
Syntax
ExtractText(SourceImage As String, Type_ As Long) As LongParameters
| Parameter | Description |
|---|---|
| [in] SourceImage | Full path name of the original image. |
| [in] Type_ | Instructs the OCR what type of data is written in the image. This value increases the detection accuracy and speeds up the OCR operation. This value can be one of the following values: |
Return Values
| Value | Description |
|---|---|
| TOCR_SUCCESS | Function succeeded |
| LICENSE_INVALID | License invalid; library not initialized with proper license |
| TOCRJOBERROR | OCR engine unable to perform the detection process correctly |
| TOCR_BAD_TYPE | Bad TextType value |
InitLibrary
Section titled “InitLibrary”Initializes the COcr library
Note: This function must be called before calling any other function in the library.
Syntax
InitLibrary(license As String) As LongParameters
| Parameter | Description |
|---|---|
| [in] license | Null-terminated string that holds the license key value |
Return Values
| Value | Description |
|---|---|
| LICENSE_VALID | License is valid and library is ready to use |
| LICENSE_INVALID | License invalid; all scanner operations disabled |
| LICENSE_EXPIRED | License expired; all scanner operations disabled |
| LICENSE_DOES_NOT_MATCH_LIBRARY | License invalid for this library; all library operations disabled |
| GENERAL_ERR_PLUG_NOT_FOUND | Returned if the attached scanner is not one of the following: ScanShell 600 | ScanShell 800 | ScanShell 1000 |
Returns the mText value in string format (read-only)
Syntax
mText As StringParameters
None
Return Values
Returns the mText value
Version
Section titled “Version”Returns the Version value in string format (read-only)
Syntax
Version As StringParameters
None
Return Values
Returns the Version value