TX Sheet Control

SaveOptions.EmbedUsedFonts Property

Property
Namespace
TXTextControl.TXSheetControl.Server
Package
TXTextControl.TXSheetControl.Server as TXTextControl.TXSheetControl.Api.dll from the private NuGet feed or the supplied NuGet folder
Also in
TXTextControl.TXSheetControl.Blazor as TXTextControl.TXSheetControl.Api.dll

Include resolved font files in an exported workbook without changing the current document. Defaults to false when omitted.

Syntax

public bool? EmbedUsedFonts { get; init; }

Applies to TXWB, XLSX and ODS. ServerSheetControl collects font bytes from document resources and its configured font directory. Substituted fonts are embedded under their real family names with aliases for the original workbook names. PDF already embeds rendering fonts. XLSX font resources use the TX extension, not Excel's own font-embedding feature. Embedding permissions and font size/count budgets remain enforced. Failure or cancellation does not modify the live workbook.

Example

using TXTextControl.TXSheetControl.Server;

static Task<byte[]> ExportPortableInvoiceAsync(ServerSheetControl control)
{
    return control.SaveAsync(StreamType.InternalWorkbookFormat,
        new SaveOptions { EmbedUsedFonts = true });
}