<< Click to Display Table of Contents >> Navigation: OCR Module > High-Level Functions > OCR_GetFields |
OCR_GetFields uses the regions and parameters specified to perform OCR on the input document, then formats and returns the plain text. Please note that all elements are case-sensitive:
HRESULT OCR_GetField(
PXODocument Doc,
PXO_Options* pOptions,
BSTR* bstrTextOut,
PXO_InputFields InFields,
LPWSTR delim=L"\n"
DWORD Flags=PXO_Origin_BottomLeft
);
Doc
Specifies the PXODocument that OCR_Init created and OCR_LoadW or OCR_LoadA loaded.
pOptions
This parameter is an input pointer to a PXO_Options structure that contains the OCR parameters.
bstrTextOut
This parameter is a pointer to the BSTR variable that receives the allocated text. SysFreeString() must be used to deallocate text when this process is complete.
InFields
Input PXO_InputFields structure containing an input field/zone definition for regional/zonal OCR. See also OCR_LoadTemplateW and OCR_NewInputFields.
delim
This parameter is an optional text delimiter that is inserted between recognized pages of text. The default value is L”\n”, which is a newline.
Flags
This is an optional parameter that specifies the coordinate system that input fields use. See PXO_FieldInputFlags for further information.
If the function succeeds then the return value is OCR_OK.
If the function fails then the return value is an error code.