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

Glossary Item Box

Writes a document to the specified file according to the current conversion settings.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_document_write(
   HIG_REC_DOCUMENT hDocument,
   const LPSTR lpOutputFileName
);

Arguments:

hDocument Document handle.
lpOutputFileName Path to the file to which to save the document.

Return Value:

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

Supported Raster Image Formats:

See IG_REC_image_import.

Remarks:

Use IG_REC_output_format_get or IG_REC_output_format_set to get or set the output format.

Example:

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

ErrCount += IG_load_file("Image.tif", &higImage);
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);
ErrCount += IG_REC_document_create(NULL, &hRecDocument);
ErrCount += IG_REC_document_page_insert(hRecDocument, higRecImage, -1);
ErrCount += IG_REC_output_codepage_set("Windows ANSI");
ErrCount += IG_REC_output_format_set("Converters.Text.XML");
ErrCount += IG_REC_document_write(hRecDocument, "output.xml");

//...

ErrCount += IG_REC_document_close(hRecDocument);
ErrCount += IG_image_delete(higImage);

See Also

HIG_REC_DOCUMENT

©2012. Accusoft Corporation. All Rights Reserved.