TX Text Control .NET Server

CssSaveMode 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

HTML only. Specifies how to save stylesheet data with a HTML document.

Syntax

public CssSaveMode CssSaveMode { get; set; }

Members

ValueDescription
NoneAll format information is saved in the body of the HTML document through HTML tags.
InlineStylesheets are saved in the head of the HTML document.
CreateFileStylesheets are saved in a newly created CSS file. This file has the same name and location as the corresponding HTML file or is specified through the SaveSettings.CssFileName property. The file is only created if it does not exist. If the HTML document is saved in a memory buffer, this setting cannot be used.
OverwriteFileStylesheets are saved in a newly created CSS file. This file has the same name and location as the corresponding HTML file or is specified through the SaveSettings.CssFileName property. If the file already exists, it is overridden. If the HTML document is saved in a memory buffer, this setting cannot be used.

Examples

The following example configures how the current document is exported to WordprocessingML by using SaveSettings.CssSaveMode.

textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();

saveSettings.CssSaveMode = CssSaveMode.CreateFile;
Console.WriteLine($"Css Save Mode used by Save Settings: {saveSettings.CssSaveMode}");

textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);