TX Text Control .NET for Windows Forms

SaveDocumentToMemory Method

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

Description

Saves the merged document.

Syntax

SaveDocumentToMemory(out byte[], BinaryStreamType, SaveSettings)

Saves the merged document to a byte array.

public void SaveDocumentToMemory(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.

SaveDocumentToMemory(out string, StringStreamType, SaveSettings)

Saves the merged document to a string.

public void SaveDocumentToMemory(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 Document To Memory in a focused Mail Merge workflow.

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