com.groupdocs.watermark

Interfaces

Classes

Exceptions

com.groupdocs.watermark

Class SlidesDocument

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


    public class SlidesDocument
    extends Document

    Represents a PowerPoint document where a watermark can be placed.

    This example demonstrates how to load and save PowerPoint document of any supported type.

    SlidesDocument document = Document.load(SlidesDocument.class, "D:\\input.ppt");
      
      // Use addWatermark method to add watermark to all slides.
      
      // Use the collection of slides to add watermark to a particular slide.
      
      // Save changes.
      document.save("D:\\output.ppt");
      document.close();
      
    • Method Detail

      • getSlideWidth

        public final double getSlideWidth()

        Gets the width of a slide in points.

        Returns:
        The width of a slide in points.
      • getSlideHeight

        public final double getSlideHeight()

        Gets the height of a slide in points.

        Returns:
        The height of a slide in points.
      • getNotesSlideWidth

        public final double getNotesSlideWidth()

        Gets the width of a notes slide in points.

        Returns:
        The width of a notes slide in points.
      • getNotesSlideHeight

        public final double getNotesSlideHeight()

        Gets the height of a notes slide in points.

        Returns:
        The height of a notes slide in points.
      • getSlides

        public final SlidesSlideCollection getSlides()

        Gets the collection of all slides of this SlidesDocument.

        Returns:
        The collection of all slides of this SlidesDocument.

        This example demonstrates how to add watermark to a particular slide.

        SlidesDocument document = Document.load(SlidesDocument.class, "D:\\input.ppt");
          
          // Initialize text or image watermark.
          TextWatermark watermark = new TextWatermark("DRAFT", new Font("Arial", 19));
          
          // Add watermark to a particular slide.
          document.getSlides().get_Item(0).addWatermark(watermark);
          
          // Save changes.
          document.save("D:\\output.ppt");
          document.close();
          
      • getMasterSlides

        public final SlidesMasterSlideCollection getMasterSlides()

        Gets the collection of all master slides of this SlidesDocument.

        Returns:
        The collection of all master slides of this SlidesDocument.
      • getLayoutSlides

        public final SlidesLayoutSlideCollection getLayoutSlides()

        Gets the collection of all layout slides of this SlidesDocument.

        Returns:
        The collection of all layout slides of this SlidesDocument.
      • getMasterNotesSlide

        public final SlidesMasterNotesSlide getMasterNotesSlide()

        Gets the master slide for all notes slides of this SlidesDocument.

        Returns:
        The master slide for all notes slides of this SlidesDocument.
      • getMasterHandoutSlide

        public final SlidesMasterHandoutSlide getMasterHandoutSlide()

        Gets the master handout slide of this SlidesDocument.

        Returns:
        The master handout slide of this SlidesDocument.
      • addWatermark

        public final void addWatermark(Watermark watermark,
                        SlidesShapeSettings shapeSettings)

        Adds a watermark to all slides of this SlidesDocument. 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 - Settings that should be applied to the watermark.
      • addImageWatermark

        public final void addImageWatermark(ImageWatermark watermark,
                             SlidesImageEffects effects,
                             SlidesShapeSettings shapeSettings)

        Adds an image watermark to all slides of this SlidesDocument. This method assumes that watermark offset and size are measured in points (if they are assigned).

        Parameters:
        watermark - The image watermark to add to the document.
        effects - Image effects that should be applied to the watermark.
        shapeSettings - Shape settings that should be applied to the watermark.
      • addImageWatermark

        public final void addImageWatermark(ImageWatermark watermark,
                             SlidesImageEffects effects)

        Adds an image watermark to all slides of this SlidesDocument. This method assumes that watermark offset and size are measured in points (if they are assigned).

        Parameters:
        watermark - The image watermark to add to the document.
        effects - Image effects that should be applied to the watermark.
      • addTextWatermark

        public final void addTextWatermark(TextWatermark watermark,
                            SlidesTextEffects effects,
                            SlidesShapeSettings shapeSettings)

        Adds a text watermark to all slides of this SlidesDocument. This method assumes that watermark offset and size are measured in points (if they are assigned).

        Parameters:
        watermark - The text watermark to add to the document.
        effects - Text effects that should be applied to the watermark.
        shapeSettings - Shape settings that should be applied to the watermark.
      • addTextWatermark

        public final void addTextWatermark(TextWatermark watermark,
                            SlidesTextEffects effects)

        Adds a text watermark to all slides of this SlidesDocument. This method assumes that watermark offset and size are measured in points (if they are assigned).

        Parameters:
        watermark - The text watermark to add to the document.
        effects - Text effects that should be applied to the watermark.
      • encrypt

        public final void encrypt(String password)

        Encrypts the document.

        Parameters:
        password - The password that will be required to open the document.
      • decrypt

        public final void decrypt()

        Decrypts the document.

      • dispose

        protected void dispose(boolean disposing)

        Releases all resources used by the SlidesDocument

        Overrides:
        dispose in class Document
        Parameters:
        disposing - True to release both managed and unmanaged resources; false to release only unmanaged resources.