com.groupdocs.watermark.options

Interfaces

Classes

com.groupdocs.watermark.options

Class PresentationWatermarkSlideOptions



  • public final class PresentationWatermarkSlideOptions
    extends PresentationWatermarkBaseSlideOptions
    Represents options when adding watermark to a Presentation document slide.

    Learn more:

    The following example demonstrates how to add a watermark to a particular slide of a Power Point presentation.

    PresentationLoadOptions loadOptions = new PresentationLoadOptions();
       Watermarker watermarker = new Watermarker("C:\\Documents\\test.ppt", loadOptions);
    
       TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 36, FontStyle.Bold | FontStyle.Italic));
       watermark.setHorizontalAlignment(HorizontalAlignment.Center);
       watermark.setVerticalAlignment(VerticalAlignment.Center);
     
       PresentationWatermarkSlideOptions options = new PresentationWatermarkSlideOptions();
       options.setSlideIndex(0);
       options.setLocked(false); // default
       options.setProtectWithUnreadableCharacters(false); // default
       options.setName(null); // default
       options.setAlternativeText(null); // default
       
       watermarker.save("C:\\Documents\\watermarked_test.ppt");
       watermarker.close();
     
    • Method Detail

      • getSlideIndex

        public final int getSlideIndex()

        Gets the index of slide to add the watermark to.

        Returns:
        The index of slide to add the watermark to.


        -1 means all slides.
      • setSlideIndex

        public final void setSlideIndex(int value)

        Sets the index of slide to add the watermark to.

        Parameters:
        value - The index of slide to add the watermark to.


        -1 means all slides.