GetCharacterData Method of the PlainText Object
This method returns the information about all characters in the text as a set of arrays: the page numbers on which the characters are located, the coordinates of characters' rectangles, and characters' confidences.
You can then iterate through the data on your side and avoid the potentially time-consuming procedure of iterating the text blocks and paragraphs. This is especially recommended if your application is working via DCOM.
Syntax
C++
HRESULT GetCharacterData( SAFEARRAY** PageNumbers, SAFEARRAY** LeftBorders, SAFEARRAY** TopBorders, SAFEARRAY** RightBorders, SAFEARRAY** BottomBorders, SAFEARRAY** Confidences, SAFEARRAY** IsSuspicious );
C#
void GetCharacterData( out int[] PageNumbers, out int[] LeftBorders, out int[] TopBorders, out int[] RightBorders, out int[] BottomBorders, out int[] Confidences, out bool[] IsSuspicious );
Visual Basic .NET
Sub GetCharacterData( _ ByRef PageNumbers() As Integer, _ ByRef LeftBorders() As Integer, _ ByRef TopBorders() As Integer, _ ByRef RightBorders() As Integer, _ ByRef BottomBorders() As Integer, _ ByRef Confidences() As Integer, _ ByRef IsSuspicious() As Boolean _ )
Parameters
- PageNumbers
- [out] An array of page numbers on which the characters are located.
- LeftBorders
- [out] An array of coordinates of left borders of characters' rectangles as relative to the deskewed black-and-white plane of the source image.
- TopBorders
- [out] An array of coordinates of top borders of characters' rectangles as relative to the deskewed black-and-white plane of the source image.
- RightBorders
- [out] An array of coordinates of right borders of characters' rectangles as relative to the deskewed black-and-white plane of the source image.
- BottomBorders
- [out] An array of coordinates of bottom borders of characters' rectangles as relative to the deskewed black-and-white plane of the source image.
- Confidences
- [out] An array of characters' confidences.
- IsSuspicious
- [out] An array of boolean values which specify whether the characters are recognized suspiciously.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
Remarks
You do not need to create the arrays manually before the method call, they are created internally by the method. But you are responsible for destroying the arrays when they are no longer in use, by calling the SafeArrayDestroy method for them.
See also
9/17/2024 3:14:40 PM