com.aspose.slides
Class Presentation

java.lang.Object
  extended by com.aspose.slides.Presentation

public final class Presentation
extends java.lang.Object

Represents the Microsoft PowerPoint presentation.


Constructor Summary
Presentation()
          This constructor creates new presentation from scratch.
Presentation(java.io.InputStream stream)
          This constructor is the primary mechanism for reading an existing Presentation.
 
Method Summary
 Slide addBodySlide()
          Adds the new Slide with header and body placeholders to a presentation.
 Slide addDoubleBodySlide()
          Adds the new Slide with header and two body placeholders to a presentation.
 Slide addEmptySlide()
          Adds the new empty Slide to a presentation.
 Slide addHeaderSlide()
          Adds the new Slide with header placeholder to a presentation.
 Slide addTitleSlide()
          Adds the new Slide with header and subheader placeholders to a presentation.
 Slide cloneSlide(Slide srcSlide, int position)
          Makes the copy of a slide.
 Slide cloneSlide(Slide srcSlide, int position, Presentation pres, java.util.TreeMap idList)
          Makes a copy of a slide with master slides and inserts it to another presentation.
 void deleteHandout()
          Deletes Handout object from a presentation.
 void deleteUnusedMasters()
          Deletes all unused masters from a presentation.
 long getActiveSlideId()
          Returns the Id of the active slide in a presentation.
 java.lang.String getAuthor()
          Returns the author of a presentation.
 java.lang.String getComments()
          Returns the comments of a presentation.
 java.lang.String getCompany()
          Company where presentation was created.
 java.util.Date getCreateTime()
          Returns the time when presentation was created.
 DocumentProperties getCustomDocumentProperties()
          Returns the custom properties of a presentation.
 java.util.Date getEditTime()
          Returns the edit time of a presentation.
 short getFirstSlideNumber()
          Returns the number of the first slide in a presentation.
 Fonts getFonts()
          Returns the list of all fonts in a presentation.
 java.lang.String getKeywords()
          Returns the keywords of a presentation.
 java.lang.String getLastAuthor()
          Returns the last author of a presentation.
 java.util.Date getLastPrintTime()
          Returns the last time when presentation was printed.
 java.util.Date getLastSaveTime()
          Returns the last time when presentation was saved.
 MainMaster getMainMaster()
          Returns the first main master of a presentation.
 java.lang.String getManager()
          Returns the manager of a presentation.
 Slides getMasters()
          Returns the list of all masters in a presentation.
 java.awt.Point getNotesSize()
          Returns the size of a notes in a presentation.
 PictureBullets getPictureBullets()
          Returns a list of all pictures used for a bullets that are defined in the presentation.
 Pictures getPictures()
          Returns the list of all pictures in a presentation.
 Slide getSlideById(long id)
          Returns the slide by Id.
 Slide getSlideByPosition(int position)
          Returns the slide by SlidePosition.
 Slides getSlides()
          Returns the list of all slides in a presentation.
 SlideShowSettings getSlideShowSettings()
          Returns the settings of a slide show in a presentation.
 java.awt.Point getSlideSize()
          Returns the size of a slides in a presentation.
 int getSlideSizeType()
          Returns the size type of a slides in a presentation.
 java.lang.String getSubject()
          Returns the subject of a presentation.
 java.lang.String getTitle()
          Returns the title of a presentation.
 void setActiveSlideId(long value)
          Sets the Id of the active slide in a presentation.
 void setAuthor(java.lang.String value)
          Sets the author of a presentation.
 void setComments(java.lang.String value)
          Sets the comments of a presentation.
 void setCompany(java.lang.String value)
          Sets the company of a presentation.
 void setCreateTime(java.util.Date value)
          Sets the time when presentation was created.
 void setEditTime(java.util.Date value)
          Sets the edit time of a presentation.
 void setFirstSlideNumber(short value)
          Sets the number of the first slide in a presentation.
 void setKeywords(java.lang.String value)
          Sets the keywords of a presentation.
 void setLastAuthor(java.lang.String value)
          Sets the last author of a presentation.
 void setLastPrintTime(java.util.Date value)
          Sets the last time when presentation was printed.
 void setLastSaveTime(java.util.Date value)
          Sets the last time when presentation was saved.
 void setManager(java.lang.String value)
          Sets the manager of a presentation.
 void setSlideSize(java.awt.Point value)
          Sets the size of a slides in a presentation.
 void setSlideSizeType(int value)
          Sets the SizeType of a slides in a presentation.
 void setSubject(java.lang.String value)
          Sets the subject of a presentation.
 void setTitle(java.lang.String value)
          Sets the title of a presentation.
 void write(java.io.OutputStream stream)
          Writes the contents of the Presentation to an output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Presentation

public Presentation()
             throws PptReadException
This constructor creates new presentation from scratch. Created presentation has one empty slide.

Throws:
PptReadException

Presentation

public Presentation(java.io.InputStream stream)
             throws PptException
This constructor is the primary mechanism for reading an existing Presentation.

Parameters:
stream - the input stream.
Throws:
PptException - on presentation reading errors.
Method Detail

write

public void write(java.io.OutputStream stream)
           throws PptWriteException
Writes the contents of the Presentation to an output stream.

Parameters:
stream - the output stream.
Throws:
PptWriteException - on presentation writing errors.

deleteHandout

public void deleteHandout()
Deletes Handout object from a presentation.


deleteUnusedMasters

public void deleteUnusedMasters()
Deletes all unused masters from a presentation.


getSlides

public Slides getSlides()
Returns the list of all slides in a presentation.

Returns:
The slides list.

getMasters

public Slides getMasters()
Returns the list of all masters in a presentation.

Returns:
The masters list.

getMainMaster

public MainMaster getMainMaster()
Returns the first main master of a presentation.

Returns:
The first main master.

getSlideById

public Slide getSlideById(long id)
Returns the slide by Id.

Parameters:
id - the Id of a slide.
Returns:
The slide object.

getSlideByPosition

public Slide getSlideByPosition(int position)
Returns the slide by SlidePosition.

Parameters:
position - the position of a slide.
Returns:
The slide object.

cloneSlide

public Slide cloneSlide(Slide srcSlide,
                        int position)
                 throws PptEditException
Makes the copy of a slide.

Parameters:
srcSlide - the source slide to clone.
position - the position where new slide should be inserted.
Returns:
The new slide object.
Throws:
PptEditException - on slide cloning errors.

cloneSlide

public Slide cloneSlide(Slide srcSlide,
                        int position,
                        Presentation pres,
                        java.util.TreeMap idList)
                 throws PptEditException
Makes a copy of a slide with master slides and inserts it to another presentation.

Parameters:
srcSlide - the source slide.
position - the position where new slide should be inserted.
pres - the presentation where new slide will be inserted.
idList - TreeMap object to store temporary information about ppt's masters.
Returns:
The new slide object.
Throws:
PptEditException - on slide cloning errors.

addEmptySlide

public Slide addEmptySlide()
                    throws PptReadException,
                           PptEditException
Adds the new empty Slide to a presentation.

Returns:
Slide object.
Throws:
PptReadException
PptEditException

addBodySlide

public Slide addBodySlide()
                   throws PptReadException,
                          PptEditException
Adds the new Slide with header and body placeholders to a presentation.

Returns:
Slide object.
Throws:
PptReadException
PptEditException

addDoubleBodySlide

public Slide addDoubleBodySlide()
                         throws PptReadException,
                                PptEditException
Adds the new Slide with header and two body placeholders to a presentation.

Returns:
Slide object.
Throws:
PptReadException
PptEditException

addTitleSlide

public Slide addTitleSlide()
                    throws PptReadException,
                           PptEditException
Adds the new Slide with header and subheader placeholders to a presentation.

Returns:
Slide object.
Throws:
PptReadException
PptEditException

addHeaderSlide

public Slide addHeaderSlide()
                     throws PptReadException,
                            PptEditException
Adds the new Slide with header placeholder to a presentation.

Returns:
Slide object.
Throws:
PptReadException
PptEditException

getPictures

public Pictures getPictures()
Returns the list of all pictures in a presentation.

Returns:
The pictures list.

getFonts

public Fonts getFonts()
Returns the list of all fonts in a presentation.

Returns:
The fonts list.

getSlideSize

public java.awt.Point getSlideSize()
Returns the size of a slides in a presentation.

Returns:
The size of a slides.

setSlideSize

public void setSlideSize(java.awt.Point value)
Sets the size of a slides in a presentation.

Parameters:
value - The size of a slides.

getNotesSize

public java.awt.Point getNotesSize()
Returns the size of a notes in a presentation.

Returns:
The size of a notes.

getSlideSizeType

public int getSlideSizeType()
Returns the size type of a slides in a presentation.

Returns:
The size type of a slides. See SlideSizeType.

setSlideSizeType

public void setSlideSizeType(int value)
Sets the SizeType of a slides in a presentation.

Parameters:
value - The size type of a slides. See SlideSizeType.

getTitle

public java.lang.String getTitle()
Returns the title of a presentation.

Returns:
The presentation title.

setTitle

public void setTitle(java.lang.String value)
              throws PptReadException
Sets the title of a presentation.

Parameters:
value - the presentation title.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getSubject

public java.lang.String getSubject()
Returns the subject of a presentation.

Returns:
The presentation subject.

setSubject

public void setSubject(java.lang.String value)
                throws PptReadException
Sets the subject of a presentation.

Parameters:
value - the presentation subject.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getAuthor

public java.lang.String getAuthor()
Returns the author of a presentation.

Returns:
The presentation author.

setAuthor

public void setAuthor(java.lang.String value)
               throws PptReadException
Sets the author of a presentation.

Parameters:
value - the presentation author.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getKeywords

public java.lang.String getKeywords()
Returns the keywords of a presentation.

Returns:
The presentation keywords.

setKeywords

public void setKeywords(java.lang.String value)
                 throws PptReadException
Sets the keywords of a presentation.

Parameters:
value - the presentation keywords.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getComments

public java.lang.String getComments()
Returns the comments of a presentation.

Returns:
The presentation comments.

setComments

public void setComments(java.lang.String value)
                 throws PptReadException
Sets the comments of a presentation.

Parameters:
value - the presentation comments.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getLastAuthor

public java.lang.String getLastAuthor()
Returns the last author of a presentation.

Returns:
The last author of a presentation.

setLastAuthor

public void setLastAuthor(java.lang.String value)
                   throws PptReadException
Sets the last author of a presentation.

Parameters:
value - the last author of a presentation.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getLastPrintTime

public java.util.Date getLastPrintTime()
Returns the last time when presentation was printed.

Returns:
The last printing time.

setLastPrintTime

public void setLastPrintTime(java.util.Date value)
                      throws PptReadException
Sets the last time when presentation was printed.

Parameters:
value - the last printing time.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getEditTime

public java.util.Date getEditTime()
Returns the edit time of a presentation.

Returns:
The edit time.

setEditTime

public void setEditTime(java.util.Date value)
                 throws PptReadException
Sets the edit time of a presentation.

Parameters:
value - the edit time.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getCreateTime

public java.util.Date getCreateTime()
Returns the time when presentation was created.

Returns:
The time when presentation was created.

setCreateTime

public void setCreateTime(java.util.Date value)
                   throws PptReadException
Sets the time when presentation was created.

Parameters:
value - the time when presentation was created.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getLastSaveTime

public java.util.Date getLastSaveTime()
Returns the last time when presentation was saved.

Returns:
The last time when presentation was saved.

setLastSaveTime

public void setLastSaveTime(java.util.Date value)
                     throws PptReadException
Sets the last time when presentation was saved.

Parameters:
value - the last time when presentation was saved.
Throws:
PptReadException - if SummaryInformation not found in a presentation.

getManager

public java.lang.String getManager()
Returns the manager of a presentation.

Returns:
The manager of a presentation.

setManager

public void setManager(java.lang.String value)
                throws PptReadException
Sets the manager of a presentation.

Parameters:
value - the manager of a presentation.
Throws:
PptReadException - if DocumentSummaryInformation not found in a presentation.

getCompany

public java.lang.String getCompany()
Company where presentation was created.

Returns:
The presentation company.

setCompany

public void setCompany(java.lang.String value)
                throws PptReadException
Sets the company of a presentation.

Parameters:
value - the company of a presentation.
Throws:
PptReadException - if DocumentSummaryInformation not found in a presentation.

getCustomDocumentProperties

public DocumentProperties getCustomDocumentProperties()
Returns the custom properties of a presentation.

Returns:
the custom properties.

getFirstSlideNumber

public short getFirstSlideNumber()
Returns the number of the first slide in a presentation.

Returns:
the number of the first slide in a presentation.

setFirstSlideNumber

public void setFirstSlideNumber(short value)
Sets the number of the first slide in a presentation.

Parameters:
value - the number of the first slide in a presentation.

getActiveSlideId

public long getActiveSlideId()
Returns the Id of the active slide in a presentation.

Returns:
the Id of the active slide.

setActiveSlideId

public void setActiveSlideId(long value)
                      throws java.lang.Exception
Sets the Id of the active slide in a presentation.

Parameters:
value - the Id of the active slide.
Throws:
PptPropertyException
java.lang.Exception

getSlideShowSettings

public SlideShowSettings getSlideShowSettings()
Returns the settings of a slide show in a presentation.

Returns:
the settings of a slide show in a presentation. See SlideShowSettings.

getPictureBullets

public PictureBullets getPictureBullets()
Returns a list of all pictures used for a bullets that are defined in the presentation.

Returns:
PictureBullets object.