Nicomsoft OCR: Developer's Guide


Blk_SetWordText


Syntax

C++:int Blk_SetWordText(HBLK BlkObj, int LineIndex, int WordIndex, UNICODECHAR* TextStr)
C#:int Blk_SetWordText(int BlkObj, int LineIndex, int WordIndex, string TextStr)
Visual Basic:Function Blk_SetWordText(ByVal BlkObj As Integer, ByVal LineIndex As Integer, ByVal WordIndex As Integer, ByVal TextStr As String) As Integer
Java:int Blk_SetWordText(HBLK BlkObj, int LineIndex, int WordIndex, String TextStr)
Delphi:function Blk_SetWordText(BlkObj:HBLK; LineIndex:integer; WordIndex:integer; TextStr:PWCHAR):integer


Description

Sets a new text for the specified word in the block after performing OCR with the Img_OCR function. The function must correct the word text after recognition. Use the Blk_GetLineCnt function to get the total number of text lines in the block. Use the Blk_GetWordCnt function to get the total number of words in the specified line.


Parameters

BlkObj [IN] – the Block object. You can also specify the Image object if you want to work with the global list of text lines for the entire image.
LineIndex [IN] – the index of the text line to retrieve; 0 – the first line.
WordIndex [IN] – the index of the word in the specified text line to retrieve; 0 – the first word.
TextStr [IN] – the buffer that contains a Unicode, null-terminated string with the new word text.


Return value

Zero if success, otherwise an error code.


Remarks

None.


Example

None.