LoadOptions.WarningCallback
LoadOptions WarningCallback property. Called during a load operation when an issue is detected that might result in data or formatting fidelity loss.
LoadOptions.WarningCallback property
Called during a load operation, when an issue is detected that might result in data or formatting fidelity loss.
public IWarningCallback WarningCallback { get; set; }
Examples
Implementation of IWarningCallback, which prints all detected warnings to console output.
private class AllWarningCallback : IWarningCallback
{
public void Warning(WarningInfo info)
{
Console.WriteLine($"Warning type: {info.WarningType}; Warning source: {info.Source}; Description: {info.Description}");
}
}
Shows how to specify warning callback in document load options.
LoadOptions loadOptions = new LoadOptions();
loadOptions.WarningCallback = new AllWarningCallback();
Converter.Create()
.From(MyDir + "Simple.docx", loadOptions)
.To(ArtifactsDir + "LoadOptions.WarningCallback.pdf")
.Execute();
See Also
- interface IWarningCallback
- class LoadOptions
- namespace Wordize.Loading
- assembly Wordize