PresentationContent
Inheritance: java.lang.Object, com.groupdocs.watermark.contents.ContentPart, com.groupdocs.watermark.contents.Content
All Implemented Interfaces: com.groupdocs.watermark.internal.IEncryptable
public class PresentationContent extends Content implements IEncryptable
Represents a PowerPoint document where a watermark can be placed.
Learn more:
The following example demonstrates how to load and save PowerPoint document of any supported type.
PresentationLoadOptions loadOptions = new PresentationLoadOptions(); Watermarker watermarker = new Watermarker(“D:\input.ppt”, loadOptions);
// Use add method to add watermark to a particular slide or all slides.
// Save changes. watermarker.save(“D:\output.ppt”); watermarker.close();
Constructors
Methods
Method | Description |
---|---|
getSlideWidth() | Gets the width of a slide in points. |
getSlideHeight() | Gets the height of a slide in points. |
getNotesSlideWidth() | Gets the width of a notes slide in points. |
getNotesSlideHeight() | Gets the height of a notes slide in points. |
getSlides() | Gets the collection of all slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent) . |
getMasterSlides() | Gets the collection of all master slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent) . |
getLayoutSlides() | Gets the collection of all layout slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent) . |
getMasterNotesSlide() | Gets the master slide for all notes slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent) . |
getMasterHandoutSlide() | Gets the master handout slide of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent) . |
getAsposeSlidesPresentation() | |
addWatermark(Watermark watermark, PresentationShapeSettings shapeSettings, IPresentationWatermarkEffects effects) | |
encrypt(String password) | Encrypts the document. |
decrypt() | Decrypts the document. |
setWriteProtection(String password) | |
removeWriteProtection() | |
performSave(String filePath) | |
performSave(String filePath, SaveOptions saveOptions) | |
performSave(OutputStream stream) | |
performSave(OutputStream stream, SaveOptions saveOptions) | |
getDocumentInfo() | |
getFileType() | |
add(Watermark watermark, WatermarkOptions options) | |
generatePreview(PreviewOptions previewOptions) |
PresentationContent(StreamContainer stream, StrategyManager strategyManager, PresentationLoadOptions presentationLoadOptions, IPresentationInfo presentationInfo, WatermarkerSettings watermarkerSettings)
public PresentationContent(StreamContainer stream, StrategyManager<Integer> strategyManager, PresentationLoadOptions presentationLoadOptions, IPresentationInfo presentationInfo, WatermarkerSettings watermarkerSettings)
Parameters:
Parameter | Type | Description |
---|---|---|
stream | StreamContainer | |
strategyManager | com.groupdocs.watermark.internal.StrategyManager<java.lang.Integer> | |
presentationLoadOptions | PresentationLoadOptions | |
presentationInfo | com.aspose.slides.IPresentationInfo | |
watermarkerSettings | WatermarkerSettings |
getSlideWidth()
public final double getSlideWidth()
Gets the width of a slide in points.
Returns: double - The width of a slide in points.
getSlideHeight()
public final double getSlideHeight()
Gets the height of a slide in points.
Returns: double - The height of a slide in points.
getNotesSlideWidth()
public final double getNotesSlideWidth()
Gets the width of a notes slide in points.
Returns: double - The width of a notes slide in points.
getNotesSlideHeight()
public final double getNotesSlideHeight()
Gets the height of a notes slide in points.
Returns: double - The height of a notes slide in points.
getSlides()
public final PresentationSlideCollection getSlides()
Gets the collection of all slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
Returns:
PresentationSlideCollection - The collection of all slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
getMasterSlides()
public final PresentationMasterSlideCollection getMasterSlides()
Gets the collection of all master slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
Returns:
PresentationMasterSlideCollection - The collection of all master slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
getLayoutSlides()
public final PresentationLayoutSlideCollection getLayoutSlides()
Gets the collection of all layout slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
Returns:
PresentationLayoutSlideCollection - The collection of all layout slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
getMasterNotesSlide()
public final PresentationMasterNotesSlide getMasterNotesSlide()
Gets the master slide for all notes slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
Returns:
PresentationMasterNotesSlide - The master slide for all notes slides of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
getMasterHandoutSlide()
public final PresentationMasterHandoutSlide getMasterHandoutSlide()
Gets the master handout slide of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
Returns:
PresentationMasterHandoutSlide - The master handout slide of this [PresentationContent](../../com.groupdocs.watermark.contents/presentationcontent)
.
getAsposeSlidesPresentation()
public final Presentation getAsposeSlidesPresentation()
Returns: com.aspose.slides.Presentation
addWatermark(Watermark watermark, PresentationShapeSettings shapeSettings, IPresentationWatermarkEffects effects)
public final void addWatermark(Watermark watermark, PresentationShapeSettings shapeSettings, IPresentationWatermarkEffects effects)
Parameters:
Parameter | Type | Description |
---|---|---|
watermark | Watermark | |
shapeSettings | PresentationShapeSettings | |
effects | IPresentationWatermarkEffects |
encrypt(String password)
public final void encrypt(String password)
Encrypts the document.
Parameters:
Parameter | Type | Description |
---|---|---|
password | java.lang.String | The password that will be required to open the document. |
decrypt()
public final void decrypt()
Decrypts the document.
setWriteProtection(String password)
public final void setWriteProtection(String password)
Parameters:
Parameter | Type | Description |
---|---|---|
password | java.lang.String |
removeWriteProtection()
public final void removeWriteProtection()
performSave(String filePath)
public void performSave(String filePath)
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String |
performSave(String filePath, SaveOptions saveOptions)
public void performSave(String filePath, SaveOptions saveOptions)
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | |
saveOptions | SaveOptions |
performSave(OutputStream stream)
public void performSave(OutputStream stream)
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream |
performSave(OutputStream stream, SaveOptions saveOptions)
public void performSave(OutputStream stream, SaveOptions saveOptions)
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | |
saveOptions | SaveOptions |
getDocumentInfo()
public IDocumentInfo getDocumentInfo()
Returns: IDocumentInfo
getFileType()
public FileType getFileType()
Returns: FileType
add(Watermark watermark, WatermarkOptions options)
public void add(Watermark watermark, WatermarkOptions options)
Parameters:
Parameter | Type | Description |
---|---|---|
watermark | Watermark | |
options | WatermarkOptions |
generatePreview(PreviewOptions previewOptions)
public void generatePreview(PreviewOptions previewOptions)
Parameters:
Parameter | Type | Description |
---|---|---|
previewOptions | PreviewOptions |