WarningSource enumeration

WarningSource enumeration

Specifies the module that produces a warning during document loading or saving.

Members

NameDescription
UNKNOWNThe warning source is not specified.
LAYOUTModule that builds a document layout.
DRAWING_MLModule that renders DrawingML shapes.
OFFICE_MATHModule that renders OfficeMath.
SHAPESModule that renders ordinary shapes.
METAFILEModule that renders metafiles.
XPSModule that renders XPS.
PDFModule that renders PDF.
IMAGEModule that renders images.
DOCXModule that reads/writes DOCX files.
DOCModule that reads/writes binary DOC files.
TEXTModule that reads/writes plaintext files.
RTFModule that reads/writes RTF files.
WORD_MLModule that reads/writes WML files.
NRXCommon modules that are shared between DOCX/WML reader/writer modules.
ODTModule that reads/writes ODT files.
HTMLModule that reads/writes HTML/MHTML files.
VALIDATORModule that verifies model consistency and validity.
XAMLModule that reads/writes Xaml files.
SVMModule that reads Svm files.
MATH_MLModule that reads W3C MathML files.
FONTModule that reads font files.
SVGModule that reads SVG files.
MARKDOWNModule that reads/writes Markdown files.
CHMModule that reads CHM files.
EPUBModule that reads/writes EPUB files.
XMLModule that reads XML files.
XLSXModule that writes XLSX files.

Examples

Shows how to work with the warning source.

doc = aw.Document(file_name=MY_DIR + 'Emphases markdown warning.docx')
warnings = aw.WarningInfoCollection()
doc.warning_callback = warnings
doc.save(file_name=ARTIFACTS_DIR + 'DocumentBuilder.EmphasesWarningSourceMarkdown.md')
for warning_info in warnings:
    if warning_info.source == aw.WarningSource.MARKDOWN:
        self.assertEqual('The (*, 0:11) cannot be properly written into Markdown.', warning_info.description)

See Also