public abstract class PresentationWatermarkBaseSlideOptions extends PresentationWatermarkOptions
Learn more:
The following example demonstrates how to add a watermark to different service slides of a Power Point presentation.
PresentationLoadOptions loadOptions = new PresentationLoadOptions(); Watermarker watermarker = new Watermarker("D:\\test.pptx", loadOptions); TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 8)); // Add watermark to all master slides PresentationWatermarkMasterSlideOptions masterSlideOptions = new PresentationWatermarkMasterSlideOptions(); masterSlideOptions.setMasterSlideIndex(-1); // default watermarker.add(watermark, masterSlideOptions); // Add watermark to all layout slides PresentationWatermarkLayoutSlideOptions layoutSlideOptions = new PresentationWatermarkLayoutSlideOptions(); layoutSlideOptions.setLayoutSlideIndex(-1); // default watermarker.add(watermark, layoutSlideOptions); // Add watermark to all notes slides PresentationWatermarkNoteSlideOptions noteSlideOptions = new PresentationWatermarkNoteSlideOptions(); noteSlideOptions.setSlideIndex(-1); // default watermarker.add(watermark, noteSlideOptions); // Add watermark to handout master PresentationWatermarkMasterHandoutSlideOptions masterHandoutSlideOptions = new PresentationWatermarkMasterHandoutSlideOptions(); watermarker.add(watermark, masterHandoutSlideOptions); // Add watermark to notes master PresentationWatermarkMasterNotesSlideOptions masterNotesSlideOptions = new PresentationWatermarkMasterNotesSlideOptions(); watermarker.add(watermark, masterNotesSlideOptions); watermarker.save("D:\\watermarked_test.pptx"); watermarker.close();
Modifier | Constructor and Description |
---|---|
protected |
PresentationWatermarkBaseSlideOptions()
Initializes a new instance of the
class. |
Modifier and Type | Method and Description |
---|---|
String |
getAlternativeText()
Gets the descriptive (alternative) text that will be associated with a shape.
|
IPresentationWatermarkEffects |
getEffects()
Gets a value of
or
for effects that should be applied to the watermark. |
String |
getName()
Gets the name a shape.
|
boolean |
getProtectWithUnreadableCharacters()
Gets or sets a value indicating whether the text watermark characters are mixed with unreadable characters.
|
boolean |
isLocked()
Gets a value indicating whether an editing of the shape in PowerPoint is forbidden.
|
void |
setAlternativeText(String value)
Sets the descriptive (alternative) text that will be associated with a shape.
|
void |
setEffects(IPresentationWatermarkEffects value)
Sets a value of
or
for effects that should be applied to the watermark. |
void |
setLocked(boolean value)
Sets a value indicating whether an editing of the shape in PowerPoint is forbidden.
|
void |
setName(String value)
Sets the name a shape.
|
void |
setProtectWithUnreadableCharacters(boolean value)
Gets or sets a value indicating whether the text watermark characters are mixed with unreadable characters.
|
protected PresentationWatermarkBaseSlideOptions()
PresentationWatermarkBaseSlideOptions
class.public final boolean isLocked()
Gets a value indicating whether an editing of the shape in PowerPoint is forbidden.
public final void setLocked(boolean value)
Sets a value indicating whether an editing of the shape in PowerPoint is forbidden.
value
- If the value is true, shape editing will be forbidden.
By default, the value is false, the shape can be edited in PowerPoint.public final boolean getProtectWithUnreadableCharacters()
This protection applies only when
returns PresentationWatermarkBaseSlideOptions.isLocked()
true
.
public final void setProtectWithUnreadableCharacters(boolean value)
This protection applies only when
returns PresentationWatermarkBaseSlideOptions.isLocked()
true
.
value
- A value indicating whether the text watermark characters are mixed with unreadable characters.public final String getName()
Gets the name a shape.
public final void setName(String value)
Sets the name a shape.
value
- The shape name.public final String getAlternativeText()
Gets the descriptive (alternative) text that will be associated with a shape.
public final void setAlternativeText(String value)
Sets the descriptive (alternative) text that will be associated with a shape.
value
- The descriptive (alternative) text that will be associated with a shape.public final IPresentationWatermarkEffects getEffects()
PresentationImageEffects
or
PresentationTextEffects
for effects that should be applied to the watermark.PresentationImageEffects
or
PresentationTextEffects
for effects that should be applied to the watermark.public final void setEffects(IPresentationWatermarkEffects value)
PresentationImageEffects
or
PresentationTextEffects
for effects that should be applied to the watermark.value
- The value of PresentationImageEffects
or
PresentationTextEffects
for effects that should be applied to the watermark.