Aspose::Words::Loading::HtmlLoadOptions::get_SupportVml method
Contents
[
Hide
]HtmlLoadOptions::get_SupportVml method
Gets or sets a value indicating whether to support VML images.
bool Aspose::Words::Loading::HtmlLoadOptions::get_SupportVml() const
Examples
Shows how to support conditional comments while loading an HTML document.
auto loadOptions = MakeObject<HtmlLoadOptions>();
// If the value is true, then we take VML code into account while parsing the loaded document.
loadOptions->set_SupportVml(supportVml);
// 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 "SupportVml" 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.
auto doc = MakeObject<Document>(MyDir + u"VML conditional.htm", loadOptions);
if (supportVml)
{
ASSERT_EQ(ImageType::Jpeg, (System::ExplicitCast<Shape>(doc->GetChild(NodeType::Shape, 0, true)))->get_ImageData()->get_ImageType());
}
else
{
ASSERT_EQ(ImageType::Png, (System::ExplicitCast<Shape>(doc->GetChild(NodeType::Shape, 0, true)))->get_ImageData()->get_ImageType());
}
See Also
- Class HtmlLoadOptions
- Namespace Aspose::Words::Loading
- Library Aspose.Words for C++