TX Text Control .NET Server

FileName 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 name. It can include a relative or absolute path.

Syntax

public string FileName { get; }

Examples

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

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

Console.WriteLine($"File Name: {embeddedFile.FileName}");
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.