java.lang.Object
com.aspose.words.ShapeMarkupLanguage
public class ShapeMarkupLanguage
- extends java.lang.Object
Utility class containing constants.
Specifies Markup language used for the shape.
Example:
Shows conversion VML shapes to DML using ISO/IEC 29500:2008 Strict compliance level.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Set Word2003 version for document, for inserting image as VML shape
doc.getCompatibilityOptions().optimizeFor(MsWordVersion.WORD_2003);
builder.insertImage(getImageDir() + "Transparent background logo.png");
// Loop through all single shapes inside document
for (Shape shape : (Iterable<Shape>) doc.getChildNodes(NodeType.SHAPE, true)) {
System.out.println(shape.getMarkupLanguage());
}
// Iso29500_2008 does not allow VML shapes
// You need to use OoxmlCompliance.Iso29500_2008_Strict for converting VML to DML shapes
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.setCompliance(OoxmlCompliance.ISO_29500_2008_STRICT);
saveOptions.setSaveFormat(SaveFormat.DOCX);
doc.save(getArtifactsDir() + "OoxmlSaveOptions.Iso29500Strict.docx", saveOptions);
Field Summary |
static final byte | DML = 0 | |
Drawing Markup Language is used to define the shape.
|
static final byte | VML = 1 | |
Vector Markup Language is used to define the shape.
|
DML = 0 | |
public static final byte DML |
-
Drawing Markup Language is used to define the shape.
This is the new standard for drawing for Office Open XML which has appeared first in ECMA-376 1st edition (2006), first appeared in MS Word 2007.
VML = 1 | |
public static final byte VML |
-
Vector Markup Language is used to define the shape.
A deprecated format included in Office Open XML for legacy reasons only.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.