IdxRichEditDocument.LoadDocument(TStream,TdxRichEditDocumentFormat) Method
Imports a document from the specified stream.
Declaration
procedure LoadDocument(AStream: TStream; AFormat: TdxRichEditDocumentFormat); overload;
Parameters
Name | Type | Description |
---|---|---|
AStream | TStream | Contains a source document. |
AFormat | TdxRichEditDocumentFormat | A document format. |
Remarks
If the AFormat parameter accepts the TdxRichEditDocumentFormat.Undefined value, the LoadDocument procedure iterates through all supported document formats to find the best possible match in the target stream’s content.
A successful LoadDocument procedure call updates a Rich Edit component‘s Options.DocumentSaveOptions.CurrentFileName and Options.DocumentSaveOptions.CurrentFormat properties.
Note
The document server component has built-in support only for the plain text format. The Rich Edit control supports both TXT and RTF formats out-of-the-box. Refer to the following topic for information on how to enable optional document formats:
A LoadDocument procedure call cannot import a document if its format is disabled.