WarningInfo Class
Wordize.WarningInfo class. Contains information about a warning that Aspose.Words issued during document loading or saving.
WarningInfo class
Contains information about a warning that Aspose.Words issued during document loading or saving.
public class WarningInfo
Properties
Name | Description |
---|---|
Description { get; } | Returns the description of the warning. |
Source { get; } | Returns the source of the warning. |
WarningType { get; } | Returns the type of the warning. |
Remarks
You do not create instances of this class. Objects of this class are created and passed by Wordize to the Warning
method.
Examples
Implementation of IWarningCallback to get font substitution warnings.
private class FontSubstitutionWarningCallback : IWarningCallback
{
public void Warning(WarningInfo info)
{
if (info.WarningType == WarningType.FontSubstitution)
{
Console.WriteLine(info.Description);
}
}
}
Demonstrates how to specify a fonts folder in the default font settings and use a warning callback to receive notifications about font substitution during document rendering.
Wordize.Settings.DefaultFontSettings.SetFontsFolder(MyDir + "MyFonts", true);
ConverterContext context = new ConverterContext();
context.WarningCallback = new FontSubstitutionWarningCallback();
Converter.Create(context)
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "FontSubstitution.pdf")
.Execute();