support_vml property

HtmlLoadOptions.support_vml property

Gets or sets a value indicating whether to support VML images.

@property
def support_vml(self) -> bool:
    ...

@support_vml.setter
def support_vml(self, value: bool):
    ...

Examples

Shows how to support conditional comments while loading an HTML document.

load_options = aw.loading.HtmlLoadOptions()
# If the value is True, then we take VML code into account while parsing the loaded document.
load_options.support_vml = support_vml
# This document contains a JPEG image within "<!--[if gte vml 1]>" tags,
# and a different PNG image within "<![if !vml]>" tags.
# If we set the "support_vml" flag to "True", then Aspose.Words will load the JPEG.
# If we set this flag to "False", then Aspose.Words will only load the PNG.
doc = aw.Document(MY_DIR + 'VML conditional.htm', load_options)
if support_vml:
    self.assertEqual(aw.drawing.ImageType.JPEG, doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape().image_data.image_type)
else:
    self.assertEqual(aw.drawing.ImageType.PNG, doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape().image_data.image_type)

See Also