TableSubstitutionRule.Save

TableSubstitutionRule Save method. Saves the current table substitution settings to file.

Save(string)

Saves the current table substitution settings to file.

public void Save(string fileName)
ParameterTypeDescription
fileNameStringOutput file name.

Examples

Shows how to save table substitution rules to file and load them back from the file.

FontSettings fontSettings = new FontSettings();
// Save table substitution rules to file.
fontSettings.SubstitutionSettings.TableSubstitution.Save(ArtifactsDir + "TableSubstitution.xml");

// Rules can be edited in XML file and then loaded back.
// ................

// Load table substitution rules from file.
fontSettings.SubstitutionSettings.TableSubstitution.Load(ArtifactsDir + "TableSubstitution.xml");

See Also


Save(Stream)

Saves the current table substitution settings to stream.

public void Save(Stream outputStream)
ParameterTypeDescription
outputStreamStreamOutput stream.

Examples

Shows how to save table substitution rules to stream and load them back from the stream.

FontSettings fontSettings = new FontSettings();
// Save table substitution rules to stream.
using (Stream tableSubstitutionStream = File.Create(ArtifactsDir + "TableSubstitutionStream.xml"))
    fontSettings.SubstitutionSettings.TableSubstitution.Save(tableSubstitutionStream);

// Rules can be edited in XML file and then loaded back.
// ................

// Load table substitution rules from stream.
using (Stream tableSubstitutionStream = File.OpenRead(ArtifactsDir + "TableSubstitutionStream.xml"))
    fontSettings.SubstitutionSettings.TableSubstitution.Load(tableSubstitutionStream);

See Also