TX Text Control .NET Server

Load Method

Method|Introduced in 15.0
Namespace
TXTextControl.DocumentServer
Package
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Loads a document from a file that is used for further processing.

Syntax

public void Load(string filename, FileFormat documentFormat);

Parameters

ParameterDescription
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.");