ImageGear Professional v18.4 > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Formatted Output Functions > IG_REC_document_write |
Writes a document to the specified file according to the current conversion settings.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_document_write(
HIG_REC_DOCUMENT hDocument,
const LPSTR lpOutputFileName
);
|
Name | Type | Description |
hDocument | HIG_REC_DOCUMENT | Document handle. |
lpOutputFileName | const LPSTR | Path to the file to which to save the document. |
See IG_REC_image_import.
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); |
Use IG_REC_output_format_get or IG_REC_output_format_set to get or set the output format.