com.aspose.slides
Class PresentationEx

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

public final class PresentationEx
extends java.lang.Object

Represents a Microsoft PowerPoint 2007 presentation.


Constructor Summary
PresentationEx()
           This constructor creates new presentation from scratch.
PresentationEx(java.io.InputStream stream)
           This constructor is the primary mechanism for reading an existing Presentation.
PresentationEx(java.io.InputStream stream, LoadOptions loadOptions)
           
PresentationEx(LoadOptions loadOptions)
           This constructor creates new presentation from scratch.
PresentationEx(java.lang.String file)
           This constructor gets a source file path from which the contents of the Presentation are read.
PresentationEx(java.lang.String file, LoadOptions loadOptions)
           This constructor gets a source file path from which the contents of the Presentation are read.
 
Method Summary
 void encrypt(java.lang.String password)
           Encrypts Presentation with specified password.
 AudioExCollection getAudios()
           Returns the collection of all embedded audio files in the presentation.
 CommentAuthorExCollection getCommentAuthors()
           Returns the collection of comments autors.
 java.util.Date getCurrentDateTime()
           
 TextStyleEx getDefaultTextStyle()
           Returns default text style for shapes.
 DocumentPropertiesEx getDocumentProperties()
           Returns DocumentPropertiesEx object which contains standard and custom document properties.
 boolean getEncryptDocumentProperties()
           This property makes sense, if presentation is password protected.
 HeaderFooterManagerEx getHeaderFooterManager()
           Returns actual HeaderFooter manager.
 ImageExCollection getImages()
           Returns the collection of all images in the presentation.
 LayoutSlideExCollection getLayoutSlides()
           Returns a list of all layout slides that are defined in the presentation.
 MasterHandoutSlideEx getMasterHandoutSlide()
           Returns a master for all notes slides of this presentation if there is one, otherwise returns null.
 MasterNotesSlideEx getMasterNotesSlide()
           Returns a master for all notes slides of this presentation if there is one, otherwise returns null.
 MasterSlideExCollection getMasters()
           Returns a list of all master slides that are defined in the presentation.
 SlideEx getSlideById(long id)
           Returns a slide by Id.
 SlideExCollection getSlides()
           Returns a list of all slides that are defined in the presentation.
 SlideSizeEx getSlideSize()
           Returns slide size object.
 int getSourceFormat()
           Returns information about from which format presentation was loaded.
 TagExCollection getTags()
           Returns the presentation's tags collection.
 boolean getUpdateDateTimeFields()
           Determines wheather Aspose.Slides should update date and time fields.
 boolean getUpdateSlideNumberFields()
           Determines wheather Aspose.Slides should update slide number fields.
 VideoExCollection getVideos()
           Returns the collection of all embedded video files in the presentation.
 boolean isEncrypted()
           Gets a value indicating whether this instance is encrypted.
 boolean isOnlyDocumentPropertiesLoaded()
           This property makes sense, if presentation file is password protected and document properties of this file are public.
 boolean isWriteProtected()
           Gets a value indicating whether this presentation is write protected.
 void print()
           Prints the whole presentation to the default printer.
 void print(com.aspose.ms.System.Drawing.Printing.PrinterSettings printerSettings)
           Prints the presentation according to the specified printer settings, using the standard (no User Interface) print controller.
 void print(com.aspose.ms.System.Drawing.Printing.PrinterSettings printerSettings, java.lang.String presName)
           Prints the document according to the specified printer settings, using the standard (no User Interface) print controller and a presentation name.
 void print(java.lang.String printerName)
           Print the whole presentation to the specified printer, using the standard (no User Interface) print controller.
 void removeEncryption()
           Removes the encryption.
 void removeWriteProtection()
           Removes write protection for this presentation.
 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 format, SaveOptions 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 format, SaveOptions options)
           Saves all slides of a presentation to a file with the specified format and with additional options.
 void setCurrentDateTime(java.util.Date value)
           
 void setEncryptDocumentProperties(boolean value)
           
 void setUpdateDateTimeFields(boolean value)
           
 void setUpdateSlideNumberFields(boolean value)
           
 void setWriteProtection(java.lang.String password)
           Set write protection for this presentation with specified password.
 void write(java.io.OutputStream stream)
           Writes the contents of the Presentation to an output stream.
 void write(java.io.OutputStream stream, PptxOptions options)
           
 void write(java.lang.String file)
           Writes the contents of the Presentation to a file specified by the file name.
 void write(java.lang.String file, PptxOptions options)
           Writes the contents of the Presentation to a file specified by the file name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresentationEx

public PresentationEx()

This constructor creates new presentation from scratch. Created presentation has one empty slide.


PresentationEx

public PresentationEx(LoadOptions loadOptions)

This constructor creates new presentation from scratch. Created presentation has one empty slide.

Parameters:
loadOptions - Additional load options.

PresentationEx

public PresentationEx(java.io.InputStream stream)

This constructor is the primary mechanism for reading an existing Presentation.

Parameters:
stream - Input stream.

PresentationEx

public PresentationEx(java.io.InputStream stream,
                      LoadOptions loadOptions)

PresentationEx

public PresentationEx(java.lang.String file)

This constructor gets a source file path from which the contents of the Presentation are read.


  
  [C#]
  PresentationEx pres = new PresentationEx("demo.pptx");
  [Visual Basic]
  Dim pres As PresentationEx = New PresentationEx("demo.pptx")
  

Parameters:
file - Input file.

PresentationEx

public PresentationEx(java.lang.String file,
                      LoadOptions loadOptions)

This constructor gets a source file path from which the contents of the Presentation are read.

Parameters:
file - Input file.
loadOptions - Additional load options.
Method Detail

getCurrentDateTime

public java.util.Date getCurrentDateTime()

setCurrentDateTime

public void setCurrentDateTime(java.util.Date value)

getUpdateSlideNumberFields

public boolean getUpdateSlideNumberFields()

Determines wheather Aspose.Slides should update slide number fields. True by default. Read/write bool.


setUpdateSlideNumberFields

public void setUpdateSlideNumberFields(boolean value)

getUpdateDateTimeFields

public boolean getUpdateDateTimeFields()

Determines wheather Aspose.Slides should update date and time fields. False by default. Read/write bool.


setUpdateDateTimeFields

public void setUpdateDateTimeFields(boolean value)

isEncrypted

public boolean isEncrypted()

Gets a value indicating whether this instance is encrypted.

Value: true if presentation was loaded from encrypted file or Encrypt(string) method was called ; otherwise, false.


isWriteProtected

public boolean isWriteProtected()

Gets a value indicating whether this presentation is write protected.


getHeaderFooterManager

public HeaderFooterManagerEx getHeaderFooterManager()

Returns actual HeaderFooter manager.


getEncryptDocumentProperties

public boolean getEncryptDocumentProperties()

This property makes sense, if presentation is password protected. If true then document properties is encrypted in presentation file. If false then document properties is public while presentation is encrypted.


setEncryptDocumentProperties

public void setEncryptDocumentProperties(boolean value)

isOnlyDocumentPropertiesLoaded

public boolean isOnlyDocumentPropertiesLoaded()

This property makes sense, if presentation file is password protected and document properties of this file are public. Value of true means that only document properties are loaded from an encrypted presentation file without use of password. Value of false means that entire encrypted presentation is loaded with use of right password, not only document properties are loaded. If presentation isn't encrypted then property value is always false. If document properties of an encrypted file aren't public then property value is always false. If PresentationEx.EncryptDocumentProperties is true than IsOnlyDocumentPropertiesLoaded property value is always false.


write

public void write(java.lang.String file)

Writes the contents of the Presentation to a file specified by the file name.


  
  [C#]
  pres.Write("demo.pptx");
  [Visual Basic]
  pres.Write("demo.pptx")
  

Parameters:
file - Output file.

write

public void write(java.lang.String file,
                  PptxOptions options)

Writes the contents of the Presentation to a file specified by the file name.


  
  [C#]
  pres.Write("demo.pptx");
  [Visual Basic]
  pres.Write("demo.pptx")
  

Parameters:
file - Output file.
options - Saving options.

write

public void write(java.io.OutputStream stream)

Writes the contents of the Presentation to an output stream.

Parameters:
stream - Output stream.

write

public void write(java.io.OutputStream stream,
                  PptxOptions options)

encrypt

public void encrypt(java.lang.String password)

Encrypts Presentation with specified password.

Parameters:
password - The password.

removeEncryption

public void removeEncryption()

Removes the encryption.


setWriteProtection

public void setWriteProtection(java.lang.String password)

Set write protection for this presentation with specified password.

Parameters:
password - The password.

removeWriteProtection

public void removeWriteProtection()

Removes write protection for this presentation.


getSlides

public SlideExCollection getSlides()

Returns a list of all slides that are defined in the presentation. Read-only SlideExCollection.


getSlideSize

public SlideSizeEx getSlideSize()

Returns slide size object. Readonly SlideSizeEx.


getLayoutSlides

public LayoutSlideExCollection getLayoutSlides()

Returns a list of all layout slides that are defined in the presentation. Read-only LayoutSlideExCollection.


getMasters

public MasterSlideExCollection getMasters()

Returns a list of all master slides that are defined in the presentation. Read-only MasterSlideExCollection.


getMasterNotesSlide

public MasterNotesSlideEx getMasterNotesSlide()

Returns a master for all notes slides of this presentation if there is one, otherwise returns null. Readonly MasterNotesSlideEx.


getMasterHandoutSlide

public MasterHandoutSlideEx getMasterHandoutSlide()

Returns a master for all notes slides of this presentation if there is one, otherwise returns null. Readonly MasterHandoutSlideEx.


getDefaultTextStyle

public TextStyleEx getDefaultTextStyle()

Returns default text style for shapes. Readonly TextStyleEx.


getCommentAuthors

public CommentAuthorExCollection getCommentAuthors()

Returns the collection of comments autors. Readonly CommentAuthorExCollection.


getDocumentProperties

public DocumentPropertiesEx getDocumentProperties()

Returns DocumentPropertiesEx object which contains standard and custom document properties. Read-only DocumentPropertiesEx.


getImages

public ImageExCollection getImages()

Returns the collection of all images in the presentation. Read-only ImageExCollection


getAudios

public AudioExCollection getAudios()

Returns the collection of all embedded audio files in the presentation. Read-only AudioExCollection


getVideos

public VideoExCollection getVideos()

Returns the collection of all embedded video files in the presentation. Read-only VideoExCollection


getTags

public TagExCollection getTags()

Returns the presentation's tags collection. Read-only TagExCollection.


getSlideById

public SlideEx getSlideById(long id)

Returns a slide by Id.

Parameters:
id - Id of a slide.
Returns:
SlideEx object.

getSourceFormat

public int getSourceFormat()

Returns information about from which format presentation was loaded.


save

public void save(java.lang.String fname,
                 int format)

Saves all slides of a presentation to a file with the specified format.

Parameters:
fname - Path to the created file.
format - Format of the exported data.

save

public void save(java.io.OutputStream stream,
                 int format)

Saves all slides of a presentation to a stream in the specified format.

Parameters:
stream - Output stream.
format - Format of the exported data.

save

public void save(java.lang.String fname,
                 int format,
                 SaveOptions options)

Saves all slides of a presentation to a file with the specified format and with additional options.

Parameters:
fname - Path to the created file.
format - Format of the exported data.
options - Additional format options.

save

public void save(java.io.OutputStream stream,
                 int format,
                 SaveOptions options)

print

public void print()

Prints the whole presentation to the default printer.


print

public void print(com.aspose.ms.System.Drawing.Printing.PrinterSettings printerSettings)

Prints the presentation according to the specified printer settings, using the standard (no User Interface) print controller.

Parameters:
printerSettings - The .NET printer settings to use.

print

public void print(java.lang.String printerName)

Print the whole presentation to the specified printer, using the standard (no User Interface) print controller.

Parameters:
printerName - The name of the printer.

print

public void print(com.aspose.ms.System.Drawing.Printing.PrinterSettings printerSettings,
                  java.lang.String presName)

Prints the document according to the specified printer settings, using the standard (no User Interface) print controller and a presentation name.

Parameters:
printerSettings - The .NET printer settings to use.
presName - The presentation name to display (for example, in a print status dialog box or printer queue) while printing the presentation.