TX Text Control .NET for WPF

SaveToMemory Method

Method|Introduced in 15.0
Namespace
TXTextControl.DocumentServer
Package
TXTextControl.TextControl.WPF.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.

Syntax

SaveToMemory(out byte[], BinaryStreamType, SaveSettings)

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

public void SaveToMemory(out byte[] data, BinaryStreamType fileFormat, SaveSettings saveSettings);
ParameterDescription
data

Specifies a byte array or a string into which the data is saved. No memory needs to be allocated through the caller.

fileFormat

Specifies one of the BinaryStreamType or the StringStreamType values.

saveSettings

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

SaveToMemory(out string, StringStreamType, SaveSettings)

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

public void SaveToMemory(out string data, StringStreamType fileFormat, SaveSettings saveSettings);
ParameterDescription
data

Specifies a byte array or a string into which the data is saved. No memory needs to be allocated through the caller.

fileFormat

Specifies one of the BinaryStreamType or the StringStreamType values.

saveSettings

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

Examples

The following example uses Save To Memory in a focused Document Controller workflow.

byte[] data = new byte[] { 1 };
documentController.SaveToMemory(out data, BinaryStreamType.WordprocessingML, new SaveSettings());