TX Text Control .NET Server

Save 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

Saves the document that is currently loaded in the DocumentController to a file.

Syntax

public void Save(string filename, StreamType fileFormat, SaveSettings saveSettings);

Parameters

ParameterDescription
filename

Specifies a file into which the data is saved. If the file does not exist, it is created. If the file exists, its contents are overwritten.

fileFormat

Specifies one of the StreamType values.

saveSettings

Specifies a SaveSettings object with additional information and settings for the save operation.

Examples

The following example saves document content in a specified format. The created object is then available to the surrounding document workflow.

documentController.Save("document.docx", StreamType.WordprocessingML, new SaveSettings());
Console.WriteLine("Document Controller is ready for use.");