WarningInfo Class

Contains information about a warning that Aspose.Words issued during document loading or saving.
Inheritance Hierarchy

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.2
public class WarningInfo

The WarningInfo type exposes the following members.

Public propertyCode exampleDescription
Returns the description of the warning.
Public propertySource
Returns the source of the warning.
Public propertyCode exampleWarningType
Returns the type of the warning.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

You do not create instances of this class. Objects of this class are created and passed by Aspose.Words to the Warning(WarningInfo) method.

Shows how to implement the IWarningCallback to be notified of any font substitution during document save.
public class HandleDocumentWarnings : IWarningCallback
    /// <summary>
    /// Our callback only needs to implement the "Warning" method. This method is called whenever there is a
    /// potential issue during document processing. The callback can be set to listen for warnings generated during document
    /// load and/or document save.
    /// </summary>
    public void Warning(WarningInfo info)
        // We are only interested in fonts being substituted
        if (info.WarningType == WarningType.FontSubstitution)
            Console.WriteLine("Font substitution: " + info.Description);

See Also