Nicomsoft OCR: Developer's Guide


Svr_GetText


Syntax

C++:int Svr_GetText(HSVR SvrObj, int PageIndex, UNICODECHAR* TextStr, int MaxLen)
C#:int Svr_GetText(int SvrObj, int PageIndex, out string TextStr)
Visual Basic:Function Svr_GetText(ByVal SvrObj As Integer, ByVal PageIndex As Integer, ByRef TextStr As String) As Integer
Java:int Svr_GetText(HSVR SvrObj, int PageIndex, StringBuffer TextStr)
Delphi:function Svr_GetText(SvrObj:HSVR; PageIndex:integer; TextStr:PWCHAR; MaxLen:integer):integer


Description

Retrieves the recognized text saved to the SVR object for the specified page or for the entire document after performing OCR and calling the Svr_AddPage function.


Parameters

SvrObj [IN] – the Saver object.
PageIndex [IN] – the page index. To get the text of the entire document saved to the SVR object, specify -1.
TextStr [OUT] – the buffer that will get the Unicode, null-terminated string containing the text.
MaxLen [IN] – the buffer size, in Unicode characters, including the null termination character. If 0, then the function will not copy anything to the buffer, but will only return the buffer size (in Unicode characters, without the null termination character) needed to store the text.


Return value

If success, the text length in Unicode characters, without the null termination character; otherwise, an error code.


Remarks

None.


Example

None.