page_text()

extern void * KADMOS_API page_text
  (const RePageData *repagedata, int page_number, 
  long output_code, unsigned char reject_level, 
  int reject_char, char *indent,
  int indent_count, long text_format);
      

Parameter:

repagedata
Pointer to a structure RePageData.
page_number
page number
output_code
Minimum confidence level to output the recognized character.
reject_level
Code page in which the text should be output.
reject_char
Character to display a reject.
indent
Leading blanks or other leading character.
indent_count
Number of ident.
text_format
Return the text line as TEXT_FORMAT_ANSI or TEXT_FORMAT_KADMOS_MULTIBYTE. TEXT_FORMAT_RELRESULT_INDICES can be used as parameter text_format with the functions re*_textline(). With the call buffer delivers the sequence of RelResult data of the recognised characters. The result graphs of rel_do() or rep_do() are sorted in a way that the recognised characters are arranged from left to right, with the output of the components of accented characters from top to bottom. In some languages accented characters must be written in different order. In Thai for instance the main character first, then the upper accents from bottom to top, and then the lower accent. The functions re*_textline() order the output characters automatical. But some users need the exact position of the characters and accents and therefore need access to the structures RelResult. The related indices can be retrieved by a call of re*_textline() with the parameter text_format set to TEXT_FORMAT_RELRESULT_INDICES.

Return value:

RE_SUCCESS or KADMOS error type.

Comment:

re_layout() analyses the structure and content of a given document.

First, the given image_in is checked for proper positioning. If required, it is deskewed. The deskewed image is provided under image_deskewed, it's image handle under h_image_deskewed. If not needed any more, the related memory has to be freed by a call to re_freeimage(). In case of deskewing the related angle is provided under re_layout_deskew.

Second, in the (deskewed) image the content area, the area of interest is determined. The related rectangle is provided under content.

Third, the content area is analysed. The found items are provided separately in the elements of re_layout_result. re_layout_result_len specifies the number of found result items or elements of re_layout_result. Every item is described by it's surrounding rectangle subimage, by it's type result_flag, and by a related handle h_result_image_bw to the black and white result image.

If successful, the function returns RE_SUCCESS, in case of error, a corresponding error type. Clear text information about errors that have occurred can be queried with re_GetErrorText() or displayed with re_DisplayErrorText().

Reference: