Skip to content

IGR_Convert_File

IGR_Convert_File converts the specified document into a plain text or HTML file, without the need to call IGR_Open_File and IGR_Get_Text.

Prototype

IGR_LONG IGR_Convert_File(
    const IGR_UCS2* FileName,
    IGR_LONG Flags,
    const IGR_UCS2* Options,
    const IGR_UCS2* OutputFilename
    Error_Control_Block* ISYSError);

Parameters

FileName: Unicode string (UCS2)

Path to the document to be converted.

Flags: IGR_LONG

Specifies processing options controlling the output. See Open Document Flags on page .

Note: IGR_Convert_File supports Text and Classic HTML modes only.

Options: Unicode string (UCS2)

Extended processing options used when converting the document to HTML. The Open Document Options are expressed as Name=Value with a semicolon delimiter.

OutputFilename: Unicode string (UCS2)

The filename where the output document is to be saved.

ISYSError: Pointer to Error_Control_Block

Returns error details if the call fails.

Return value

Success: IGR_LONG

Returns IGR_OK.

Failure: IGR_LONG

Returns one of the possible IGR_E error codes.

Sample code

Error_Control_Block ISYSError;
IGR_LONG RC;

if (IGR_OK == IGR_Convert_File(_UCS2("TEST.DOC"), IGR_BODY_AND_META | IGR_FORMAT_HTML, _UCS2("IMAGEPATH=C:\\Temp"), _UCS2("C:\\Temp\TEST.HTML"), &ISYSError)) {  }