|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.slides.Presentation
public final class Presentation
Represents a Microsoft PowerPoint presentation.
[C#] FileStream fis = new FileStream("demo.ppt", FileMode.Open, FileAccess.Read); Presentation pres = new Presentation(fis); fis.Close(); Slide sl = pres.CloneSlide(pres.Slides[0], 1); pres.Slides.RemoveAt(0); int i = 1; foreach (Slide slide in pres.Slides) { slide.GetThumbnail().Save("thumb" + i.ToString() + ".bmp"); i++; } FileStream fout = new FileStream("demo.ppt", FileMode.Create, FileAccess.Write); pres.Write(fout); fout.Flush(); fout.Close(); [Visual Basic] Dim fis As FileStream = New FileStream("demo.ppt", FileMode.Open, FileAccess.Read) Dim pres As Presentation = New Presentation(fis) fis.Close() Dim sl as Slide = pres.CloneSlide(pres.Slides(0), 1) pres.Slides.RemoveAt(0) Dim i as Integer = 1 For Each slide In pres.Slides slide.GetThumbnail().Save("thumb" & i.ToString() & ".bmp") i = i + 1 Next Dim fout As FileStream = New FileStream("demo.ppt", FileMode.Create, FileAccess.Write) pres.Write(fout) fout.Flush() fout.Close()
Constructor Summary | |
---|---|
Presentation()
This constructor creates new presentation from scratch. |
|
Presentation(java.io.InputStream stream)
|
|
Presentation(java.io.InputStream stream,
LoadOptions loadOptions)
|
|
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. |
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. |
void |
cleanAnimations()
Remove XP+ animations from slides. |
Slide |
cloneSlide(Slide srcSlide,
int position)
Makes a copy of a slide. |
Slide |
cloneSlide(Slide srcSlide,
int position,
Presentation pres,
com.aspose.ms.System.Collections.SortedList 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 or sets the Id of the active slide in a presentation. |
java.lang.String |
getAuthor()
Deprecated. |
java.lang.String |
getCategory()
Deprecated. |
CommentAuthorCollection |
getCommentAuthors()
Returns the list of authors of comments in a presentation. |
java.lang.String |
getComments()
Deprecated. |
java.lang.String |
getCompany()
Deprecated. |
java.util.Date |
getCreateTime()
|
DocumentProperties |
getDocumentProperties()
Returns the custom properties of a presentation. |
double |
getEditTime()
Deprecated. |
boolean |
getEncryptDocumentProperties()
This property makes sense, if presentation is password protected. |
short |
getFirstSlideNumber()
Returns or sets the number of the first slide in a presentation. |
FontCollection |
getFonts()
Returns a list of all fonts that are used in the presentation. |
java.lang.String |
getKeywords()
Deprecated. |
java.lang.String |
getLastAuthor()
Deprecated. |
java.util.Date |
getLastPrintTime()
|
java.util.Date |
getLastSaveTime()
|
MainMaster |
getMainMaster()
Returns a main master defined in the presentation. |
java.lang.String |
getManager()
Deprecated. |
SlideCollection |
getMasters()
Returns a list of all masters that are defined in the presentation. |
NamedSlideShowCollection |
getNamedSlideShows()
Returns a collection with named slideshows for this presentations. |
java.awt.Dimension |
getNotesSize()
|
java.lang.String |
getPassword()
Gets or sets the password to open. |
PictureBulletCollection |
getPictureBullets()
Returns a list of all pictures used for a bullets that are defined in the presentation. |
PictureCollection |
getPictures()
Returns a list of all pictures that are defined in the presentation. |
Slide |
getSlideById(long id)
Returns a slide by Id. |
Slide |
getSlideByPosition(int position)
Returns a slide by SlidePosition. |
SlideCollection |
getSlides()
Returns a list of all slides that are defined in the presentation. |
SlideShowSettings |
getSlideShowSettings()
Returns the settings of a slide show in a presentation. |
java.awt.Dimension |
getSlideSize()
|
int |
getSlideSizeType()
Gets or sets the SizeType of a slides in a presentation. |
int |
getSlideViewType()
Returns or sets the way how the presentation will be opened. |
java.lang.String |
getSubject()
Deprecated. |
TagCollection |
getTags()
Returns the tags of a presentation. |
java.lang.String |
getTitle()
Deprecated. |
boolean |
hasVBAMacros()
Determines whether the presentation has any VBA macros. |
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 |
removeVBAMacros()
Removes all VBA macros from the presentation. |
void |
removeWriteProtection()
Removes write protection for this presentation. |
void |
save(java.io.OutputStream stream,
int 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 |
saveToPdf(java.io.OutputStream stream)
|
void |
saveToPdf(java.io.OutputStream stream,
int[] slides)
|
void |
saveToPdf(java.lang.String fname)
Deprecated. |
void |
saveToPdf(java.lang.String fname,
int[] slides)
Deprecated. |
void |
setActiveSlideId(long value)
|
void |
setAuthor(java.lang.String value)
Deprecated. |
void |
setCategory(java.lang.String value)
Deprecated. |
void |
setComments(java.lang.String value)
Deprecated. |
void |
setCompany(java.lang.String value)
Deprecated. |
void |
setCreateTime(java.util.Date value)
|
void |
setEditTime(double value)
Deprecated. |
void |
setEncryptDocumentProperties(boolean value)
|
void |
setFirstSlideNumber(short value)
|
void |
setKeywords(java.lang.String value)
Deprecated. |
void |
setLastAuthor(java.lang.String value)
Deprecated. |
void |
setLastPrintTime(java.util.Date value)
|
void |
setLastSaveTime(java.util.Date value)
|
void |
setManager(java.lang.String value)
Deprecated. |
void |
setPassword(java.lang.String value)
|
void |
setSlideSize(java.awt.Dimension value)
|
void |
setSlideSizeType(int value)
|
void |
setSlideViewType(int value)
|
void |
setSubject(java.lang.String value)
Deprecated. |
void |
setTitle(java.lang.String value)
Deprecated. |
void |
setWriteProtection(java.lang.String password)
Set write protection for this presentation with specified password. |
void |
write(java.io.OutputStream stream)
|
void |
write(java.lang.String file)
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 |
---|
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)
public Presentation(java.io.InputStream stream, LoadOptions loadOptions)
public Presentation(java.lang.String file)
This constructor gets a source file path from which the contents of the Presentation are read.
[C#] Presentation pres = new Presentation("demo.ppt"); [Visual Basic] Dim pres As Presentation = New Presentation("demo.ppt")
file
- Input file.public 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.Method Detail |
---|
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.ppt"); [Visual Basic] pres.Write("demo.ppt")
file
- Output file.public void write(java.io.OutputStream stream)
public void cleanAnimations()
Remove XP+ animations from slides.
public void deleteHandout()
Deletes Handout object from a presentation.
public void deleteUnusedMasters()
Deletes all unused masters from a presentation.
public SlideCollection getSlides()
Returns a list of all slides that are defined in the presentation.
Read-only Aspose.Slides.SlideCollection
.
public SlideCollection getMasters()
Returns a list of all masters that are defined in the presentation.
Read-only Aspose.Slides.SlideCollection
.
public MainMaster getMainMaster()
Returns a main master defined in the presentation.
Read-only Aspose.Slides.MainMaster
.
public Slide getSlideById(long id)
Returns a slide by Id.
id
- Id of a slide.
public Slide getSlideByPosition(int position)
Returns a slide by SlidePosition.
position
- Position of a slide.
public Slide cloneSlide(Slide srcSlide, int position)
Makes a copy of a slide.
srcSlide
- Source slide.position
- Position of a new slide.
public Slide cloneSlide(Slide srcSlide, int position, Presentation pres, com.aspose.ms.System.Collections.SortedList idList)
Makes a copy of a slide with master slides and inserts it to another presentation.
srcSlide
- Source slide.position
- Position of a new slide.pres
- Presentation where new slide will be placed.idList
- SortedList object to store temporary information about ppt's masters.
public Slide addEmptySlide()
Adds the new empty Slide to a presentation.
public Slide addBodySlide()
Adds the new Slide with header and body placeholders to a presentation.
public Slide addDoubleBodySlide()
Adds the new Slide with header and two body placeholders to a presentation.
public Slide addTitleSlide()
Adds the new Slide with header and subheader placeholders to a presentation.
public Slide addHeaderSlide()
Adds the new Slide with header placeholder to a presentation.
public PictureCollection getPictures()
Returns a list of all pictures that are defined in the presentation.
Read-only Aspose.Slides.PictureCollection
.
public FontCollection getFonts()
Returns a list of all fonts that are used in the presentation.
Read-only Aspose.Slides.FontCollection
.
public java.awt.Dimension getSlideSize()
public void setSlideSize(java.awt.Dimension value)
public java.awt.Dimension getNotesSize()
public int getSlideSizeType()
Gets or sets the SizeType of a slides in a presentation.
Read/write Aspose.Slides.SlideSizeType
.
public void setSlideSizeType(int value)
public int getSlideViewType()
Returns or sets the way how the presentation will be opened.
Read/write Aspose.Slides.SlideViewType
.
public void setSlideViewType(int value)
@Deprecated public java.lang.String getTitle()
Title property. Read/write string
.
@Deprecated public void setTitle(java.lang.String value)
@Deprecated public java.lang.String getSubject()
Subject property. Read/write string
.
@Deprecated public void setSubject(java.lang.String value)
@Deprecated public java.lang.String getAuthor()
Author property. Read/write string
.
@Deprecated public void setAuthor(java.lang.String value)
@Deprecated public java.lang.String getKeywords()
Keywords property. Read/write string
.
@Deprecated public void setKeywords(java.lang.String value)
@Deprecated public java.lang.String getComments()
Comments property. Read/write string
.
@Deprecated public void setComments(java.lang.String value)
@Deprecated public java.lang.String getLastAuthor()
Last author property. Read/write string
.
@Deprecated public void setLastAuthor(java.lang.String value)
public java.util.Date getLastPrintTime()
public void setLastPrintTime(java.util.Date value)
@Deprecated public double getEditTime()
Edit time of a presentation in seconds. Read/write System.TimeSpan
.
@Deprecated public void setEditTime(double value)
public java.util.Date getCreateTime()
public void setCreateTime(java.util.Date value)
public java.util.Date getLastSaveTime()
public void setLastSaveTime(java.util.Date value)
@Deprecated public java.lang.String getManager()
Manager property. Read/write string
.
@Deprecated public void setManager(java.lang.String value)
@Deprecated public java.lang.String getCompany()
Company property. Read/write string
.
@Deprecated public void setCompany(java.lang.String value)
@Deprecated public java.lang.String getCategory()
Category property. Read/write string
.
@Deprecated public void setCategory(java.lang.String value)
public DocumentProperties getDocumentProperties()
Returns the custom properties of a presentation.
Read-only Aspose.Slides.DocumentProperties
.
public short getFirstSlideNumber()
Returns or sets the number of the first slide in a presentation.
Read/write short
.
public void setFirstSlideNumber(short value)
public long getActiveSlideId()
Returns or sets the Id of the active slide in a presentation.
Read/write uint
.
public void setActiveSlideId(long value)
public boolean hasVBAMacros()
Determines whether the presentation has any VBA macros.
Read-only bool
.
public void removeVBAMacros()
Removes all VBA macros from the presentation.
public SlideShowSettings getSlideShowSettings()
Returns the settings of a slide show in a presentation.
Read-only Aspose.Slides.SlideShowSettings
.
public TagCollection getTags()
Returns the tags of a presentation.
Read-only Aspose.Slides.TagCollection
.
public CommentAuthorCollection getCommentAuthors()
Returns the list of authors of comments in a presentation.
Read-only Aspose.Slides.CommentAuthorCollection
.
public PictureBulletCollection getPictureBullets()
Returns a list of all pictures used for a bullets
that are defined in the presentation.
Read-only Aspose.Slides.PictureBulletCollection
.
public NamedSlideShowCollection getNamedSlideShows()
Returns a collection with named slideshows for this presentations.
Read-only NamedSlideShowCollection
.
public java.lang.String getPassword()
Gets or sets the password to open.
Value: The password.
public void setPassword(java.lang.String value)
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.
public void setEncryptDocumentProperties(boolean value)
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 Presentation.EncryptDocumentProperties is true than IsOnlyDocumentPropertiesLoaded property value is always false.
public boolean isWriteProtected()
Gets a value indicating whether this presentation is write protected.
public void setWriteProtection(java.lang.String password)
Set write protection for this presentation with specified password.
password
- The password.public void removeWriteProtection()
Removes write protection for this presentation.
public void save(java.lang.String fname, int format)
Saves all slides of a presentation to a file with the specified format.
fname
- Path to the created file.format
- Format of the exported data.public void save(java.io.OutputStream stream, int format)
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.
fname
- Path to the created file.format
- Format of the exported data.options
- Additional format options.public void save(java.io.OutputStream stream, int format, SaveOptions options)
@Deprecated public void saveToPdf(java.lang.String fname)
Saves all slides of a presentation to PDF file.
fname
- Path to a new PDF file.@Deprecated public void saveToPdf(java.lang.String fname, int[] slides)
Saves specified slides of a presentation to PDF file.
fname
- Path to a new PDF file.slides
- Array of int values with slide positions to write to PDF.public void saveToPdf(java.io.OutputStream stream)
public void saveToPdf(java.io.OutputStream stream, int[] slides)
public void print()
Prints the whole presentation to the default printer.
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.
printerSettings
- The .NET printer settings to use.public void print(java.lang.String printerName)
Print the whole presentation to the specified printer, using the standard (no User Interface) print controller.
printerName
- The name of the printer.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.
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.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |