SaveToMemory Method
- Namespace
TXTextControl.DocumentServer
- Package
TXTextControl.asTextControl. WPF. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline Packagesdll
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);Public Sub SaveToMemory(ByRef data As Byte(), fileFormat As BinaryStreamType, saveSettings As SaveSettings)| Parameter | Description |
|---|---|
| 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);Public Sub SaveToMemory(ByRef data As String, fileFormat As StringStreamType, saveSettings As SaveSettings)| Parameter | Description |
|---|---|
| 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());Dim data As Byte() = New Byte() { 1 }
documentController.SaveToMemory(data, BinaryStreamType.WordprocessingML, New SaveSettings())