TX Text Control .NET Server

ExportFileName Property

Property
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 or sets the file name of an image used, if a Text Control document is saved. An empty string indicates that no export filename has currently be specified for the image. In this case either the original or a constructed filename is used. A filename is constructed in the following form: <document_filename>_<number>.<extension>

Syntax

public string ExportFileName { get; set; }

Examples

The following example inserts and configures a named, accessible company logo by using Image.ExportFileName.

TXTextControl.Image image = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo" };
textControl.Images.Add(image, -1);

image.ExportFileName = @"Exports\company-logo.png";
if (!string.IsNullOrWhiteSpace(image.ExportFileName))
{
    Console.WriteLine($"Export File Name: {image.ExportFileName}");
}

textControl.Save("report-with-logo.docx", StreamType.WordprocessingML);