@Deprecated public class DiagramDocument extends Document
Represents a Visio document where a watermark can be placed.
This example demonstrates how to load and save Visio document of any supported type.
DiagramDocument document = Document.load(DiagramDocument.class, "D:\\input.vsdx"); // Use addWatermark method to add watermark to all pages. // Use the collection of pages to add watermark to a particular page. // Save changes. document.save("D:\\output.vsdx"); document.close();
Modifier and Type | Method and Description |
---|---|
void |
addWatermark(Watermark watermark)
Deprecated.
Adds a watermark to this
DiagramDocument . |
void |
addWatermark(Watermark watermark,
DiagramShapeSettings shapeSettings)
Deprecated.
Adds a watermark to this
DiagramDocument . |
void |
addWatermark(Watermark watermark,
int watermarkPlacementType)
Deprecated.
Adds a watermark to this
DiagramDocument . |
void |
addWatermark(Watermark watermark,
int watermarkPlacementType,
DiagramShapeSettings shapeSettings)
Deprecated.
Adds a watermark to this
DiagramDocument . |
DiagramHeaderFooter |
getHeaderFooter()
Deprecated.
Gets the header and footer of this
DiagramDocument . |
DiagramPageCollection |
getPages()
Deprecated.
Gets the collection of all pages of this
DiagramDocument . |
close, dispose, dispose, getDefaultSearchableObjects, getInfo, getInfo, getSearchableObjects, load, load, load, load, load, load, load, load, save, save, setDefaultSearchableObjects, setSearchableObjects
findImages, findImages, findWatermarks, findWatermarks
public final DiagramPageCollection getPages()
Gets the collection of all pages of this DiagramDocument
.
DiagramDocument
.
This example demonstrates how to add watermark to a particular page.
DiagramDocument document = Document.load(DiagramDocument.class, "D:\\input.vsdx"); TextWatermark watermark = new TextWatermark("DRAFT", new Font("Arial", 19)); // Add watermark to a particular page. document.getPages().get_Item(0).addWatermark(watermark); // Save changes. document.save("D:\\output.vsdx"); document.close();
public final DiagramHeaderFooter getHeaderFooter()
Gets the header and footer of this DiagramDocument
.
DiagramDocument
.public void addWatermark(Watermark watermark)
Adds a watermark to this DiagramDocument
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
addWatermark
in class DocumentPart
watermark
- The watermark to add to the document.public final void addWatermark(Watermark watermark, int watermarkPlacementType, DiagramShapeSettings shapeSettings)
Adds a watermark to this DiagramDocument
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The watermark to add to the document.watermarkPlacementType
- The value indicating to what pages the watermark should be added.shapeSettings
- Shape settings that should be applied to the watermark.public final void addWatermark(Watermark watermark, DiagramShapeSettings shapeSettings)
Adds a watermark to this DiagramDocument
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The watermark to add to the document.shapeSettings
- Shape settings that should be applied to the watermark.public final void addWatermark(Watermark watermark, int watermarkPlacementType)
Adds a watermark to this DiagramDocument
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The watermark to add to the document.watermarkPlacementType
- The value indicating to what pages the watermark should be added.