com.groupdocs.watermark

Interfaces

Classes

Exceptions

com.groupdocs.watermark

Class SlidesBaseSlide

    • Method Detail

      • getShapes

        public final SlidesShapeCollection getShapes()

        Gets the collection of all shapes of the slide.

        Returns:
        The collection of all shapes of the slide.
      • getCharts

        public final SlidesChartCollection getCharts()

        Gets the collection of all charts on the slide.

        Returns:
        The collection of all charts on the slide.
      • getImageFillFormat

        public final SlidesImageFillFormat getImageFillFormat()

        Gets the image fill format settings of the slide.

        Returns:
        The image fill format settings of the slide.

        This example demonstrates how to set the background image for a slide.

        SlidesDocument document = Document.load(SlidesDocument.class, "D:\\input.pptx");
         File file = new File("D:\\image.jpg");
         byte[] imageBytes = new byte[(int)file.length()];
         InputStream inputStream = new FileInputStream(file);
         inputStream.read(imageBytes);
         inputStream.close();
         SlidesSlide slide = document.getSlides().get_Item(0);
         slide.getImageFillFormat().setBackgroundImage(new SlidesWatermarkableImage(imageBytes));
         slide.getImageFillFormat().setTileAsTexture(true);
         slide.getImageFillFormat().setTransparency(0.5);
         document.save("D:\\output.pptx");
         document.close();
         
      • addWatermark

        public final void addWatermark(Watermark watermark,
                        SlidesShapeSettings shapeSettings)

        Adds a watermark to the slide. This method assumes that watermark offset and size are measured in points (if they are assigned).

        Parameters:
        watermark - The watermark to add to the slide.
        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 the slide. 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 slide.
        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 the slide. 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 slide.
        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 the slide. 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 slide.
        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 the slide. 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 slide.
        effects - Text effects that should be applied to the watermark.