public final class PresentationWatermarkSlideOptions extends PresentationWatermarkBaseSlideOptions
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();
Constructor and Description |
---|
PresentationWatermarkSlideOptions()
Initializes a new instance of the
class. |
Modifier and Type | Method and Description |
---|---|
int |
getSlideIndex()
Gets the index of slide to add the watermark to.
|
void |
setSlideIndex(int value)
Sets the index of slide to add the watermark to.
|
getAlternativeText, getEffects, getName, getProtectWithUnreadableCharacters, isLocked, setAlternativeText, setEffects, setLocked, setName, setProtectWithUnreadableCharacters
public PresentationWatermarkSlideOptions()
PresentationWatermarkSlideOptions
class.public final int getSlideIndex()
Gets the index of slide to add the watermark to.
public final void setSlideIndex(int value)
Sets the index of slide to add the watermark to.
value
- The index of slide to add the watermark to.