ImageGear for C and C++ on Windows v19.0
IG_REC_output_direct_text_write

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:

Name Type Description
lpImages HIG_REC_IMAGE* Array of images objects with the valid recognition data to be converted.
nPageCount AT_INT Number of images in the array.
lpTextFileName const LPSTR 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.

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);

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.

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback