Load Method
- Namespace
TXTextControl.DocumentServer
- Package
TXTextControl.asTextControl. ASP. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline Packagesdll
Description
Loads a document from a file that is used for further processing.
Syntax
public void Load(string filename, FileFormat documentFormat);Public Sub Load(filename As String, documentFormat As FileFormat)Parameters
| Parameter | Description |
|---|---|
| filename | Specifies the document file to be loaded. |
| documentFormat | Specifies one of the DocumentServer.FileFormat values. |
Return Value
Returns true, if the document was loaded successfully and false, if the document is invalid or could not be loaded properly.
Examples
The following example loads document content in a specified format. The created object is then available to the surrounding document workflow.
documentController.Load("document.docx", TXTextControl.DocumentServer.FileFormat.MSWord);
Console.WriteLine("Document Controller is ready for use.");documentController.Load("document.docx", TXTextControl.DocumentServer.FileFormat.MSWord)
Console.WriteLine("Document Controller is ready for use.")