TX Text Control .NET Server

Data Property

Property|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets the file's data. It can be either a string or binary data given as an array of bytes.

Syntax

public object Data { get; }

Examples

The following example configures a PDF attachment before embedding it in a WordprocessingML document by using EmbeddedFile.Data.

EmbeddedFile embeddedFile = new("terms.pdf", @"Attachments\terms.pdf", "application/pdf");

Console.WriteLine($"Data: {embeddedFile.Data}");
Console.WriteLine("Embedded File is ready for use.");

SaveSettings saveSettings = new() { EmbeddedFiles = new[] { embeddedFile } };
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings);

Limitations

Read only.