public final class Presentation extends java.lang.Object implements IPresentation
Represents a Microsoft PowerPoint presentation.
Constructor and Description |
---|
Presentation()
This constructor creates new presentation from scratch.
|
Presentation(java.io.InputStream stream)
This constructor is the primary mechanism for reading an existing Presentation.
|
Presentation(java.io.InputStream stream,
LoadOptions loadOptions)
This constructor is the primary mechanism for reading an existing Presentation.
|
Presentation(LoadOptions loadOptions)
This constructor creates new presentation from scratch.
|
Presentation(java.lang.String file)
This constructor gets a source file path from which
the contents of the Presentation are read.
|
Presentation(java.lang.String file,
LoadOptions loadOptions)
This constructor gets a source file path from which
the contents of the Presentation are read.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases all resources used by this Aspose.Slides.Pptx.PrentationEx object.
|
ICustomXmlPart[] |
getAllCustomXmlParts()
Returns all custom data parts in the presentaion.
|
IAudioCollection |
getAudios()
Returns the collection of all embedded audio files in the presentation.
|
ICommentAuthorCollection |
getCommentAuthors()
Returns the collection of comments autors.
|
java.util.Date |
getCurrentDateTime()
Returns or sets date and time which will substitute content of datetime fields.
|
ICustomData |
getCustomData()
Returns the presentation's custom data.
|
ITextStyle |
getDefaultTextStyle()
Returns default text style for shapes.
|
IDocumentProperties |
getDocumentProperties()
Returns DocumentProperties object which contains standard and custom document properties.
|
int |
getFirstSlideNumber()
Represents the first slide number in the presentation
|
IFontsManager |
getFontsManager()
Returns fonts manager.
|
IPresentationHeaderFooterManager |
getHeaderFooterManager()
Returns actual HeaderFooter manager.
|
IHyperlinkQueries |
getHyperlinkQueries()
Provides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides).
|
IImageCollection |
getImages()
Returns the collection of all images in the presentation.
|
IGlobalLayoutSlideCollection |
getLayoutSlides()
Returns a list of all layout slides that are defined in the presentation.
|
IMasterHandoutSlideManager |
getMasterHandoutSlideManager()
Returns handout master manager.
|
IMasterNotesSlideManager |
getMasterNotesSlideManager()
Returns notes master manager.
|
IMasterSlideCollection |
getMasters()
Returns a list of all master slides that are defined in the presentation.
|
IMasterTheme |
getMasterTheme()
Returns master theme.
|
INotesSize |
getNotesSize()
Returns notes slide size object.
|
com.aspose.slides.IDOMObject |
getParent_Immediate()
Returns Parent_Immediate object.
|
IPresentation |
getPresentation()
Returns the parent presentation of a text.
|
IProtectionManager |
getProtectionManager()
Gets manager of the permissions for this presentation.
|
ISectionCollection |
getSections()
Returns a list of all slides sections that are defined in the presentation.
|
IBaseSlide |
getSlideById(long id)
Returns a Slide, MasterSlide or LayoutSlide by Id.
|
ISlideCollection |
getSlides()
Returns a list of all slides that are defined in the presentation.
|
ISlideSize |
getSlideSize()
Returns slide size object.
|
int |
getSourceFormat()
Returns information about from which format presentation was loaded.
|
android.graphics.Bitmap[] |
getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting)
Returns a Thumbnail android.graphics.Bitmap objects for all slides of a presentation.
|
android.graphics.Bitmap[] |
getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting,
float scaleX,
float scaleY)
Returns a Thumbnail android.graphics.Bitmap objects for all slides of a presentation with custom scaling.
|
android.graphics.Bitmap[] |
getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting,
int[] slides)
Returns a Thumbnail android.graphics.Bitmap objects for specified slides of a presentation.
|
android.graphics.Bitmap[] |
getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting,
int[] slides,
float scaleX,
float scaleY)
Returns a Thumbnail android.graphics.Bitmap objects for specified slides of a presentation with custom scaling.
|
android.graphics.Bitmap[] |
getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting,
int[] slides,
Size imageSize)
Returns a Thumbnail android.graphics.Bitmap objects for specified slides of a presentation with specified size.
|
android.graphics.Bitmap[] |
getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting,
Size imageSize)
Returns a Thumbnail android.graphics.Bitmap objects for all slides of a presentation with specified size.
|
IVbaProject |
getVbaProject()
Gets or sets VBA project with presentation macros.
|
IVideoCollection |
getVideos()
Returns the collection of all embedded video files in the presentation.
|
IViewProperties |
getViewProperties()
Gets presentation wide view properties.
|
void |
joinPortionsWithSameFormatting()
Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides.
|
void |
save(java.io.OutputStream stream,
int format)
Saves all slides of a presentation to a stream in the specified format.
|
void |
save(java.io.OutputStream stream,
int[] slides,
int format)
Saves specified slides of a presentation to a stream in the specified format with page number keeping.
|
void |
save(java.io.OutputStream stream,
int[] slides,
int format,
ISaveOptions options)
Saves specified slides of a presentation to a stream in the specified format with page number keeping.
|
void |
save(java.io.OutputStream stream,
int format,
ISaveOptions options)
Saves all slides of a presentation to a stream in the specified format and with additional options.
|
void |
save(java.lang.String fname,
int format)
Saves all slides of a presentation to a file with the specified format.
|
void |
save(java.lang.String fname,
int[] slides,
int format)
Saves specified slides of a presentation to a file with the specified format with page number keeping.
|
void |
save(java.lang.String fname,
int[] slides,
int format,
ISaveOptions options)
Saves specified slides of a presentation to a file with the specified format with page number keeping.
|
void |
save(java.lang.String fname,
int format,
ISaveOptions options)
Saves all slides of a presentation to a file with the specified format and with additional options.
|
void |
setCurrentDateTime(java.util.Date value)
Returns or sets date and time which will substitute content of datetime fields.
|
void |
setFirstSlideNumber(int value)
Represents the first slide number in the presentation
|
void |
setVbaProject(IVbaProject value)
Gets or sets VBA project with presentation macros.
|
public Presentation()
This constructor creates new presentation from scratch. Created presentation has one empty slide.
public Presentation(LoadOptions loadOptions)
This constructor creates new presentation from scratch. Created presentation has one empty slide.
loadOptions
- Additional load options.public Presentation(java.io.InputStream stream)
This constructor is the primary mechanism for reading an existing Presentation.
FileInputStream fis = new FileInputStream("demo.pptx"); Presentation pres = new Presentation(fis); fis.close();
stream
- Input stream.public Presentation(java.io.InputStream stream, LoadOptions loadOptions)
This constructor is the primary mechanism for reading an existing Presentation.
stream
- Input stream.loadOptions
- Additional load options.public Presentation(java.lang.String file)
This constructor gets a source file path from which the contents of the Presentation are read.
Presentation pres = new Presentation("demo.pptx");
file
- Input file.com.aspose.ms.System.ArgumentException
- Thrown when input file has zero lengthpublic Presentation(java.lang.String file, LoadOptions loadOptions)
This constructor gets a source file path from which the contents of the Presentation are read.
file
- Input file.loadOptions
- Additional load options.com.aspose.ms.System.ArgumentException
- Thrown when input file has zero lengthpublic final java.util.Date getCurrentDateTime()
Returns or sets date and time which will substitute content of datetime fields.
Time of this Presentation object creation by default.
Read/write Date
.
getCurrentDateTime
in interface IPresentation
public final void setCurrentDateTime(java.util.Date value)
Returns or sets date and time which will substitute content of datetime fields.
Time of this Presentation object creation by default.
Read/write Date
.
setCurrentDateTime
in interface IPresentation
public final com.aspose.slides.IDOMObject getParent_Immediate()
Returns Parent_Immediate object.
Read-only IDOMObject
.
public final IPresentationHeaderFooterManager getHeaderFooterManager()
Returns actual HeaderFooter manager.
Read-only IPresentationHeaderFooterManager
.
getHeaderFooterManager
in interface IPresentation
public final IProtectionManager getProtectionManager()
Gets manager of the permissions for this presentation.
Read-only IProtectionManager
.
getProtectionManager
in interface IPresentation
public final ISlideCollection getSlides()
Returns a list of all slides that are defined in the presentation.
Read-only ISlideCollection
.
getSlides
in interface IPresentation
public final ISectionCollection getSections()
Returns a list of all slides sections that are defined in the presentation.
Read-only ISectionCollection
.
getSections
in interface IPresentation
public final ISlideSize getSlideSize()
Returns slide size object.
Read-only ISlideSize
.
getSlideSize
in interface IPresentation
public final INotesSize getNotesSize()
Returns notes slide size object.
Read-only INotesSize
.
getNotesSize
in interface IPresentation
public final IGlobalLayoutSlideCollection getLayoutSlides()
Returns a list of all layout slides that are defined in the presentation.
Read-only IGlobalLayoutSlideCollection
.
getLayoutSlides
in interface IPresentation
public final IMasterSlideCollection getMasters()
Returns a list of all master slides that are defined in the presentation.
Read-only IMasterSlideCollection
.
getMasters
in interface IPresentation
public final IMasterNotesSlideManager getMasterNotesSlideManager()
Returns notes master manager.
Read-only IMasterNotesSlideManager
.
getMasterNotesSlideManager
in interface IPresentation
public final IMasterHandoutSlideManager getMasterHandoutSlideManager()
Returns handout master manager.
Read-only IMasterHandoutSlideManager
.
getMasterHandoutSlideManager
in interface IPresentation
public final IFontsManager getFontsManager()
Returns fonts manager.
Read-only IFontsManager
.
getFontsManager
in interface IPresentation
public final ITextStyle getDefaultTextStyle()
Returns default text style for shapes.
Read-only ITextStyle
.
getDefaultTextStyle
in interface IPresentation
public final ICommentAuthorCollection getCommentAuthors()
Returns the collection of comments autors.
Read-only ICommentAuthorCollection
.
getCommentAuthors
in interface IPresentation
public final IDocumentProperties getDocumentProperties()
Returns DocumentProperties object which contains standard and custom document properties.
Read-only IDocumentProperties
.
getDocumentProperties
in interface IPresentation
public final IImageCollection getImages()
Returns the collection of all images in the presentation.
Read-only IImageCollection
.
getImages
in interface IPresentation
public final IAudioCollection getAudios()
Returns the collection of all embedded audio files in the presentation.
Read-only IAudioCollection
.
getAudios
in interface IPresentation
public final IVideoCollection getVideos()
Returns the collection of all embedded video files in the presentation.
Read-only IVideoCollection
.
getVideos
in interface IPresentation
public final ICustomData getCustomData()
Returns the presentation's custom data.
Read-only ICustomData
.
getCustomData
in interface IPresentation
public final ICustomXmlPart[] getAllCustomXmlParts()
Returns all custom data parts in the presentaion.
Read-only ICustomXmlPart[]
.
getAllCustomXmlParts
in interface IPresentation
public final IVbaProject getVbaProject()
Gets or sets VBA project with presentation macros.
Read/write IVbaProject
.
getVbaProject
in interface IPresentation
public final void setVbaProject(IVbaProject value)
Gets or sets VBA project with presentation macros.
Read/write IVbaProject
.
setVbaProject
in interface IPresentation
public final IHyperlinkQueries getHyperlinkQueries()
Provides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides).
Read-only IHyperlinkQueries
.
getHyperlinkQueries
in interface IPresentation
public final IViewProperties getViewProperties()
Gets presentation wide view properties.
Read-only IViewProperties
.
getViewProperties
in interface IPresentation
public final int getFirstSlideNumber()
Represents the first slide number in the presentation
getFirstSlideNumber
in interface IPresentation
public final void setFirstSlideNumber(int value)
Represents the first slide number in the presentation
setFirstSlideNumber
in interface IPresentation
public final IBaseSlide getSlideById(long id)
Returns a Slide, MasterSlide or LayoutSlide by Id.
getSlideById
in interface IPresentation
id
- Id of a slide.public final int getSourceFormat()
Returns information about from which format presentation was loaded.
Read-only SourceFormat
.
getSourceFormat
in interface IPresentation
public final IMasterTheme getMasterTheme()
Returns master theme.
Read-only IMasterTheme
.
getMasterTheme
in interface IPresentation
public final void save(java.lang.String fname, int format)
Saves all slides of a presentation to a file with the specified format.
save
in interface IPresentation
fname
- Path to the created file.format
- Format of the exported data.public final void save(java.io.OutputStream stream, int format)
Saves all slides of a presentation to a stream in the specified format.
save
in interface IPresentation
stream
- Output stream.format
- Format of the exported data.public final void save(java.lang.String fname, int format, ISaveOptions options)
Saves all slides of a presentation to a file with the specified format and with additional options.
save
in interface IPresentation
fname
- Path to the created file.format
- Format of the exported data.options
- Additional format options.public final void save(java.io.OutputStream stream, int format, ISaveOptions options)
Saves all slides of a presentation to a stream in the specified format and with additional options.
save
in interface IPresentation
stream
- Output stream.format
- Format of the exported data.options
- Additional format options.com.aspose.ms.System.NotSupportedException
- If you try to save encrypted file in
none Office 2007-2010 formatpublic final android.graphics.Bitmap[] getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting)
Returns a Thumbnail android.graphics.Bitmap objects for all slides of a presentation.
getThumbnails
in interface IPresentation
notesCommentsLayouting
- Options for notes and comments layouting.public final android.graphics.Bitmap[] getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting, int[] slides)
Returns a Thumbnail android.graphics.Bitmap objects for specified slides of a presentation.
getThumbnails
in interface IPresentation
notesCommentsLayouting
- Options for notes and comments layouting.slides
- Array with slide positions, starting from 1.public final android.graphics.Bitmap[] getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting, float scaleX, float scaleY)
Returns a Thumbnail android.graphics.Bitmap objects for all slides of a presentation with custom scaling.
getThumbnails
in interface IPresentation
notesCommentsLayouting
- Options for notes and comments layouting.scaleX
- The value by which to scale this Thumbnail in the x-axis direction.scaleY
- The value by which to scale this Thumbnail in the y-axis direction.public final android.graphics.Bitmap[] getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting, int[] slides, float scaleX, float scaleY)
Returns a Thumbnail android.graphics.Bitmap objects for specified slides of a presentation with custom scaling.
getThumbnails
in interface IPresentation
notesCommentsLayouting
- Options for notes and comments layouting.slides
- Array with slide positions, starting from 1.scaleX
- The value by which to scale this Thumbnail in the x-axis direction.scaleY
- The value by which to scale this Thumbnail in the y-axis direction.public final android.graphics.Bitmap[] getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting, Size imageSize)
Returns a Thumbnail android.graphics.Bitmap objects for all slides of a presentation with specified size.
getThumbnails
in interface IPresentation
notesCommentsLayouting
- Options for notes and comments layouting.imageSize
- Size of the image to create.public final android.graphics.Bitmap[] getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting, int[] slides, Size imageSize)
Returns a Thumbnail android.graphics.Bitmap objects for specified slides of a presentation with specified size.
getThumbnails
in interface IPresentation
notesCommentsLayouting
- Options for notes and comments layouting.slides
- Array with slide positions, starting from 1.imageSize
- Size of the image to create.public final void save(java.lang.String fname, int[] slides, int format)
Saves specified slides of a presentation to a file with the specified format with page number keeping.
save
in interface IPresentation
fname
- Path to the created file.slides
- Array with slide positions, starting from 1.format
- Format of the exported data.com.aspose.ms.System.ArgumentNullException
- When stream or slides parameter is null.com.aspose.ms.System.ArgumentOutOfRangeException
- When slides parameter contains wrong page numbers.com.aspose.ms.System.InvalidOperationException
- When an unsupported SaveFormat is used, e.g. PPTX, PPTM, PPSX, PPSM, POTX, POTM, PPT, ODP.public final void save(java.lang.String fname, int[] slides, int format, ISaveOptions options)
Saves specified slides of a presentation to a file with the specified format with page number keeping.
save
in interface IPresentation
fname
- Path to the created file.slides
- Array with slide positions, starting from 1.format
- Format of the exported data.options
- Additional format options.public final void save(java.io.OutputStream stream, int[] slides, int format)
Saves specified slides of a presentation to a stream in the specified format with page number keeping.
save
in interface IPresentation
stream
- Output stream.slides
- Array with slide positions, starting from 1.format
- Format of the exported data.public final void save(java.io.OutputStream stream, int[] slides, int format, ISaveOptions options)
Saves specified slides of a presentation to a stream in the specified format with page number keeping.
save
in interface IPresentation
stream
- Output stream.slides
- Array with slide positions, starting from 1.format
- Format of the exported data.options
- Additional format options.com.aspose.ms.System.ArgumentNullException
- When stream or slides parameter is null.com.aspose.ms.System.ArgumentOutOfRangeException
- When slides parameter contains wrong page numbers.com.aspose.ms.System.InvalidOperationException
- When an unsupported SaveFormat is used, e.g. PPTX, PPTM, PPSX, PPSM, POTX, POTM, PPT, ODP.public final void joinPortionsWithSameFormatting()
Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides.
joinPortionsWithSameFormatting
in interface IPresentation
public final void dispose()
Releases all resources used by this Aspose.Slides.Pptx.PrentationEx object.
dispose
in interface com.aspose.ms.System.IDisposable
public final IPresentation getPresentation()
Returns the parent presentation of a text.
Read-only IPresentation
.
getPresentation
in interface IPresentationComponent