public class PresentationContent extends Content implements IEncryptable
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();
| Constructor and Description |
|---|
PresentationContent(StreamContainer stream,
StrategyManager<Integer> strategyManager,
PresentationLoadOptions presentationLoadOptions,
com.aspose.slides.IPresentationInfo presentationInfo,
WatermarkerSettings watermarkerSettings) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Watermark watermark,
WatermarkOptions options) |
void |
addWatermark(Watermark watermark,
PresentationShapeSettings shapeSettings,
IPresentationWatermarkEffects effects) |
void |
decrypt()
Decrypts the document.
|
protected void |
dispose(boolean disposing) |
void |
encrypt(String password)
Encrypts the document.
|
void |
generatePreview(PreviewOptions previewOptions) |
com.aspose.slides.Presentation |
getAsposeSlidesPresentation() |
IDocumentInfo |
getDocumentInfo() |
FileType |
getFileType() |
PresentationLayoutSlideCollection |
getLayoutSlides()
Gets the collection of all layout slides of this
. |
PresentationMasterHandoutSlide |
getMasterHandoutSlide()
Gets the master handout slide of this
. |
PresentationMasterNotesSlide |
getMasterNotesSlide()
Gets the master slide for all notes slides of this
. |
PresentationMasterSlideCollection |
getMasterSlides()
Gets the collection of all master slides of this
. |
double |
getNotesSlideHeight()
Gets the height of a notes slide in points.
|
double |
getNotesSlideWidth()
Gets the width of a notes slide in points.
|
double |
getSlideHeight()
Gets the height of a slide in points.
|
PresentationSlideCollection |
getSlides()
Gets the collection of all slides of this
. |
double |
getSlideWidth()
Gets the width of a slide in points.
|
void |
performSave(OutputStream stream) |
void |
performSave(OutputStream stream,
SaveOptions saveOptions) |
void |
performSave(String filePath) |
void |
performSave(String filePath,
SaveOptions saveOptions) |
void |
removeWriteProtection() |
void |
setWriteProtection(String password) |
close, dispose, getInfo, getInfo, getSearchableObjects, getStream, getWatermarkerSettings, registerDisposableResource, save, save, save, save, setSearchableObjectsaddWatermark, afterWatermarkAdding, checkWatermarkingLicenseRestrictions, findImages, findImages, getParts, getSearchWatermarksInParts, getStrategyManager, getTopParent, search, search, setParts, tryGetWatermarkerSettingspublic PresentationContent(StreamContainer stream, StrategyManager<Integer> strategyManager, PresentationLoadOptions presentationLoadOptions, com.aspose.slides.IPresentationInfo presentationInfo, WatermarkerSettings watermarkerSettings)
public void add(Watermark watermark, WatermarkOptions options)
public final void addWatermark(Watermark watermark, PresentationShapeSettings shapeSettings, IPresentationWatermarkEffects effects)
public final void decrypt()
Decrypts the document.
decrypt in interface IEncryptablepublic final void encrypt(String password)
Encrypts the document.
encrypt in interface IEncryptablepassword - The password that will be required to open the document.public void generatePreview(PreviewOptions previewOptions)
generatePreview in class Contentpublic final com.aspose.slides.Presentation getAsposeSlidesPresentation()
public IDocumentInfo getDocumentInfo()
getDocumentInfo in class Contentpublic FileType getFileType()
getFileType in class Contentpublic final PresentationLayoutSlideCollection getLayoutSlides()
PresentationContent.PresentationContent.public final PresentationMasterHandoutSlide getMasterHandoutSlide()
PresentationContent.PresentationContent.public final PresentationMasterNotesSlide getMasterNotesSlide()
PresentationContent.PresentationContent.public final PresentationMasterSlideCollection getMasterSlides()
PresentationContent.PresentationContent.public final double getNotesSlideHeight()
Gets the height of a notes slide in points.
public final double getNotesSlideWidth()
Gets the width of a notes slide in points.
public final double getSlideHeight()
Gets the height of a slide in points.
public final PresentationSlideCollection getSlides()
PresentationContent.PresentationContent.public final double getSlideWidth()
Gets the width of a slide in points.
public void performSave(OutputStream stream)
performSave in class Contentpublic void performSave(OutputStream stream, SaveOptions saveOptions)
performSave in class Contentpublic void performSave(String filePath)
performSave in class Contentpublic void performSave(String filePath, SaveOptions saveOptions)
performSave in class Contentpublic final void removeWriteProtection()
public final void setWriteProtection(String password)
Copyright © 2026. All rights reserved.