@Deprecated 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();
Modifier and Type | Method and Description |
---|---|
void |
addImageWatermark(ImageWatermark watermark,
SlidesImageEffects effects)
Deprecated.
Adds an image watermark to all slides of this
SlidesDocument . |
void |
addImageWatermark(ImageWatermark watermark,
SlidesImageEffects effects,
SlidesShapeSettings shapeSettings)
Deprecated.
Adds an image watermark to all slides of this
SlidesDocument . |
void |
addTextWatermark(TextWatermark watermark,
SlidesTextEffects effects)
Deprecated.
Adds a text watermark to all slides of this
SlidesDocument . |
void |
addTextWatermark(TextWatermark watermark,
SlidesTextEffects effects,
SlidesShapeSettings shapeSettings)
Deprecated.
Adds a text watermark to all slides of this
SlidesDocument . |
void |
addWatermark(Watermark watermark,
SlidesShapeSettings shapeSettings)
Deprecated.
Adds a watermark to all slides of this
SlidesDocument . |
void |
decrypt()
Deprecated.
Decrypts the document.
|
protected void |
dispose(boolean disposing)
Deprecated.
Releases all resources used by the
SlidesDocument |
void |
encrypt(String password)
Deprecated.
Encrypts the document.
|
SlidesLayoutSlideCollection |
getLayoutSlides()
Deprecated.
Gets the collection of all layout slides of this
SlidesDocument . |
SlidesMasterHandoutSlide |
getMasterHandoutSlide()
Deprecated.
Gets the master handout slide of this
SlidesDocument . |
SlidesMasterNotesSlide |
getMasterNotesSlide()
Deprecated.
Gets the master slide for all notes slides of this
SlidesDocument . |
SlidesMasterSlideCollection |
getMasterSlides()
Deprecated.
Gets the collection of all master slides of this
SlidesDocument . |
double |
getNotesSlideHeight()
Deprecated.
Gets the height of a notes slide in points.
|
double |
getNotesSlideWidth()
Deprecated.
Gets the width of a notes slide in points.
|
double |
getSlideHeight()
Deprecated.
Gets the height of a slide in points.
|
SlidesSlideCollection |
getSlides()
Deprecated.
Gets the collection of all slides of this
SlidesDocument . |
double |
getSlideWidth()
Deprecated.
Gets the width of a slide in points.
|
close, dispose, getDefaultSearchableObjects, getInfo, getInfo, getSearchableObjects, load, load, load, load, load, load, load, load, save, save, setDefaultSearchableObjects, setSearchableObjects
addWatermark, findImages, findImages, findWatermarks, findWatermarks
public final double getSlideWidth()
Gets the width of a slide in points.
public final double getSlideHeight()
Gets the height of a slide in points.
public final double getNotesSlideWidth()
Gets the width of a notes slide in points.
public final double getNotesSlideHeight()
Gets the height of a notes slide in points.
public final SlidesSlideCollection getSlides()
Gets the collection of all slides of this SlidesDocument
.
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();
public final SlidesMasterSlideCollection getMasterSlides()
Gets the collection of all master slides of this SlidesDocument
.
SlidesDocument
.public final SlidesLayoutSlideCollection getLayoutSlides()
Gets the collection of all layout slides of this SlidesDocument
.
SlidesDocument
.public final SlidesMasterNotesSlide getMasterNotesSlide()
Gets the master slide for all notes slides of this SlidesDocument
.
SlidesDocument
.public final SlidesMasterHandoutSlide getMasterHandoutSlide()
Gets the master handout slide of this SlidesDocument
.
SlidesDocument
.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).
watermark
- The watermark to add to the document.shapeSettings
- Settings that should be applied to the watermark.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).
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.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).
watermark
- The image watermark to add to the document.effects
- Image effects that should be applied to the watermark.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).
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.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).
watermark
- The text watermark to add to the document.effects
- Text effects that should be applied to the watermark.public final void encrypt(String password)
Encrypts the document.
password
- The password that will be required to open the document.public final void decrypt()
Decrypts the document.
Copyright © 2020. All rights reserved.