com.groupdocs.watermark

Interfaces

Classes

Exceptions

com.groupdocs.watermark

Class DiagramDocument

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable


    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();
     
    • Method Detail

      • getPages

        public final DiagramPageCollection getPages()

        Gets the collection of all pages of this DiagramDocument.

        Returns:
        The collection of all pages of this 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();
          
      • getHeaderFooter

        public final DiagramHeaderFooter getHeaderFooter()

        Gets the header and footer of this DiagramDocument.

        Returns:
        The header and footer of this DiagramDocument.
      • addWatermark

        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).

        Overrides:
        addWatermark in class DocumentPart
        Parameters:
        watermark - The watermark to add to the document.
      • addWatermark

        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).

        Parameters:
        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.
      • addWatermark

        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).

        Parameters:
        watermark - The watermark to add to the document.
        shapeSettings - Shape settings that should be applied to the watermark.
      • addWatermark

        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).

        Parameters:
        watermark - The watermark to add to the document.
        watermarkPlacementType - The value indicating to what pages the watermark should be added.