ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_output_direct_text_write
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Output Functions > IG_REC_output_direct_text_write

Glossary Item Box

Writes the recognition data of several pages to the file in the direct text format.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_output_direct_text_write(
   HIG_REC_IMAGE * lpImages,
   AT_INT nPageCount,
   const LPSTR lpTextFileName
);

Arguments:

lpImages Array of images objects with the valid recognition data to be converted.
nPageCount Number of images in the array.
lpTextFileName File to which to save recognition data.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

Use IG_REC_output_text_format_get, IG_REC_output_text_format_set to get or set the output format.

If file parameter specifies an existing file name, the text outputs are appended.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
HIGEAR higImage = 0;
HIG_REC_IMAGE higRecImage = 0;

ErrCount += IG_load_file("Image.tif", &higImage);
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);
ErrCount += IG_REC_output_text_format_set(IG_REC_DTXT_TXTS);
ErrCount += IG_REC_output_direct_text_write(&higRecImage, 1, "output.txt");

//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

©2012. Accusoft Corporation. All Rights Reserved.