ProcessorContext.WarningCallback
ProcessorContext WarningCallback property. Warning callback used by the processor.
ProcessorContext.WarningCallback property
Warning callback used by the processor.
public IWarningCallback WarningCallback { get; set; }
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();
See Also
- interface IWarningCallback
- class ProcessorContext
- namespace Wordize
- assembly Wordize