TdxRichEditCustomDocumentServer.LoadDocumentTemplate(TStream,TdxRichEditDocumentFormat) Method
Loads a document from the specified file or stream to use it as a template.
Declaration
procedure LoadDocumentTemplate(AStream: TStream; ADocumentFormat: TdxRichEditDocumentFormat); overload;
Parameters
Name | Type | Description |
---|---|---|
AStream | TStream | Contains a source document. |
ADocumentFormat | TdxRichEditDocumentFormat | A document format. |
Remarks
If the ADocumentFormat parameter accepts the TdxRichEditDocumentFormat.Undefined value, the LoadDocumentTemplate procedure iterates through all supported document formats to find the best possible match in the stream’s content.
The document server treats a loaded document as a new one (that is, resets the Options.DocumentSaveOptions.CurrentFileName and Options.DocumentSaveOptions.CurrentFormat properties).
Note
The document server component has built-in support only for the plain text format to avoid excessive dependencies. Refer to the following topic for information on how to enable RTF, DOC, DOCX, and HTML formats: Document Server: Document Management.
A LoadDocumentTemplate procedure call cannot import a document if its format is disabled.