SaveOptions.EmbedUsedFonts Property
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.asTXSheetControl. Server TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Api. dll
- Also in
TXTextControl.asTXSheetControl. Blazor 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 });
}