OCRRegion

All Editions image\bltlrgss.gif Related Transactions  image\bltlrgss.gif Example

The OCRRegion transaction saves an area of the current page of a document window to the specified file, so that it can be opened and processed by an optical character recognition (OCR) software package. If OCR notifications are enabled, then you will receive a notification when OCR regions are selected through the user interface (NotifyIM -- OCRRequest).

Type XTYP_EXECUTE

Syntax [OCRRegion(docwinID, "fileName", <formatID>, <unitType>, <x1, y1, x2, y2>)]

Parameter

Data type

Values

Meaning

docwinID

DWORD

0 | docwinID

active | specific

fileName

string

file name including path to save the OCR region under

formatID

WORD

File format IDs

File format to use. Optional parameter. See Remarks.

unitType

WORD

0

proportional units. Optional parameter. See Remarks.

x1, y1

DWORDs

top-left coordinates. Optional parameter.

x2, y2

DWORDs

bottom-right coordinates. Optional parameter, but must be used if x1, y1 are.

Remarks

This transaction can have two, three, or eight parameters. If the formatID is not specified or if 0 is used, the format specified by the "OCR Save Format" keyname in the [File] section of the Imagenation INI file is used. If the x and y coordinates are not specified, or are set to 0, then the entire page will be saved.

Release information

Added in Release 3.82.

See also

Saving OCR regions