HtmlSaveOptions.ExportFontsAsBase64

HtmlSaveOptions ExportFontsAsBase64 property. Specifies whether fonts resources should be embedded to HTML in Base64 encoding. Default is false.

HtmlSaveOptions.ExportFontsAsBase64 property

Specifies whether fonts resources should be embedded to HTML in Base64 encoding. Default is false.

public bool ExportFontsAsBase64 { get; set; }

Remarks

By default, fonts are written to separate files. If this option is set to true, fonts will be embedded into the document’s CSS in Base64 encoding.

Examples

Shows how to enable exporting font resource to HTML.

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.ExportFontResources = true;
htmlSaveOptions.ExportFontsAsBase64 = true;

Converter.Create()
    .From(MyDir + "Simple.docx")
    .To(ArtifactsDir + "HtmlSaveOptions.ExportFontResources.html", htmlSaveOptions)
    .Execute();

See Also