public interface IPresentation extends IPresentationComponent, com.aspose.ms.System.IDisposable
Presentation document
| Modifier and Type | Method and Description |
|---|---|
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.
|
IDigitalSignatureCollection |
getDigitalSignatures()
Returns the collection of signatures used to sign the presentation.
|
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 HeaderFooter manager of the presentation.
|
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.
|
IImage[] |
getImages(IRenderingOptions options)
Returns a Thumbnail Image objects for all slides of a presentation.
|
IImage[] |
getImages(IRenderingOptions options,
java.awt.Dimension imageSize)
Returns a Thumbnail Image objects for all slides of a presentation with specified size.
|
IImage[] |
getImages(IRenderingOptions options,
float scaleX,
float scaleY)
Returns a Thumbnail Image objects for all slides of a presentation with custom scaling.
|
IImage[] |
getImages(IRenderingOptions options,
int[] slides)
Returns a Thumbnail Image objects for specified slides of a presentation.
|
IImage[] |
getImages(IRenderingOptions options,
int[] slides,
java.awt.Dimension imageSize)
Returns a Thumbnail Image objects for specified slides of a presentation with specified size.
|
IImage[] |
getImages(IRenderingOptions options,
int[] slides,
float scaleX,
float scaleY)
Returns a Thumbnail Image objects for specified slides of a presentation with custom scaling.
|
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 of the presentation.
|
INotesSize |
getNotesSize()
Returns notes slide size object.
|
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.
|
java.awt.image.BufferedImage[] |
getThumbnails(IRenderingOptions options)
Deprecated.
Use GetImages(IRenderingOptions options) method instead. The method will be removed after release of version 24.7.
|
java.awt.image.BufferedImage[] |
getThumbnails(IRenderingOptions options,
java.awt.Dimension imageSize)
Deprecated.
Use getImages(IRenderingOptions options, Size imageSize) method instead. The method will be removed after release of version 24.7.
|
java.awt.image.BufferedImage[] |
getThumbnails(IRenderingOptions options,
float scaleX,
float scaleY)
Deprecated.
Use GetImages(IRenderingOptions options, float scaleX, float scaleY) method instead. The method will be removed after release of version 24.7.
|
java.awt.image.BufferedImage[] |
getThumbnails(IRenderingOptions options,
int[] slides)
Deprecated.
Use GetImages(IRenderingOptions options, int[] slides) method instead. The method will be removed after release of version 24.7.
|
java.awt.image.BufferedImage[] |
getThumbnails(IRenderingOptions options,
int[] slides,
java.awt.Dimension imageSize)
Deprecated.
Use GetImages(IRenderingOptions options, int[] slides, Size imageSize) method instead. The method will be removed after release of version 24.7.
|
java.awt.image.BufferedImage[] |
getThumbnails(IRenderingOptions options,
int[] slides,
float scaleX,
float scaleY)
Deprecated.
Use GetImages(IRenderingOptions options, int[] slides, float scaleX, float scaleY) method instead. The method will be removed after release of version 24.7.
|
IVbaProject |
getVbaProject()
Gets 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 |
highlightRegex(java.util.regex.Pattern regex,
java.awt.Color highlightColor,
IFindResultCallback callback)
Highlights all matches of the regular expression with the specified color.
|
void |
highlightText(java.lang.String text,
java.awt.Color highlightColor)
Highlights all matches of the sample text with the specified color.
|
void |
highlightText(java.lang.String text,
java.awt.Color highlightColor,
ITextSearchOptions options,
IFindResultCallback callback)
Highlights all matches of the sample text with the specified color.
|
void |
joinPortionsWithSameFormatting()
Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides.
|
void |
replaceRegex(java.util.regex.Pattern regex,
java.lang.String newText,
IFindResultCallback callback)
Replaces all matches of the regular expression with the specified string.
|
void |
replaceText(java.lang.String oldText,
java.lang.String newText,
ITextSearchOptions options,
IFindResultCallback callback)
Replaces all occurrences of the specified text with another specified text.
|
void |
save(IXamlOptions options)
Saves all slides of a presentation to a set of files representing XAML markup.
|
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.
|
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.
|
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.
|
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.
|
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 VBA project with presentation macros.
|
getPresentationjava.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.
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.
IPresentationHeaderFooterManager getHeaderFooterManager()
Returns HeaderFooter manager of the presentation.
Read-only IPresentationHeaderFooterManager.
IProtectionManager getProtectionManager()
Gets manager of the permissions for this presentation.
Read-only IProtectionManager.
ISlideCollection getSlides()
Returns a list of all slides that are defined in the presentation.
Read-only ISlideCollection.
ISectionCollection getSections()
Returns a list of all slides sections that are defined in the presentation.
Read-only ISectionCollection.
ISlideSize getSlideSize()
Returns slide size object.
Read-only ISlideSize.
INotesSize getNotesSize()
Returns notes slide size object.
Read-only INotesSize.
IGlobalLayoutSlideCollection getLayoutSlides()
Returns a list of all layout slides that are defined in the presentation.
Read-only IGlobalLayoutSlideCollection.
IMasterSlideCollection getMasters()
Returns a list of all master slides that are defined in the presentation.
Read-only IMasterSlideCollection.
IMasterNotesSlideManager getMasterNotesSlideManager()
Returns notes master manager.
Read-only IMasterNotesSlideManager.
IMasterHandoutSlideManager getMasterHandoutSlideManager()
Returns handout master manager.
Read-only IMasterHandoutSlideManager.
IFontsManager getFontsManager()
Returns fonts manager.
Read-only IFontsManager.
ITextStyle getDefaultTextStyle()
Returns default text style for shapes.
Read-only ITextStyle.
ICommentAuthorCollection getCommentAuthors()
Returns the collection of comments autors.
Read-only ICommentAuthorCollection.
IDocumentProperties getDocumentProperties()
Returns DocumentProperties object which contains standard and custom document properties.
Read-only IDocumentProperties.
IImageCollection getImages()
Returns the collection of all images in the presentation.
Read-only IImageCollection.
IAudioCollection getAudios()
Returns the collection of all embedded audio files in the presentation.
Read-only IAudioCollection.
IVideoCollection getVideos()
Returns the collection of all embedded video files in the presentation.
Read-only IVideoCollection.
ICustomData getCustomData()
Returns the presentation's custom data.
Read-only ICustomData.
IVbaProject getVbaProject()
Gets VBA project with presentation macros.
Read/write IVbaProject.
void setVbaProject(IVbaProject value)
Gets VBA project with presentation macros.
Read/write IVbaProject.
int getSourceFormat()
Returns information about from which format presentation was loaded.
Read-only SourceFormat.
IMasterTheme getMasterTheme()
Returns master theme of the presentation.
Read-only IMasterTheme.
IHyperlinkQueries getHyperlinkQueries()
Provides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides).
Read-only IHyperlinkQueries.
IViewProperties getViewProperties()
Gets presentation wide view properties.
Read-only IViewProperties.
int getFirstSlideNumber()
Represents the first slide number in the presentation. Read/write int.
void setFirstSlideNumber(int value)
Represents the first slide number in the presentation. Read/write int.
ICustomXmlPart[] getAllCustomXmlParts()
Returns all custom data parts in the presentaion.
Read-only ICustomXmlPart[].
IDigitalSignatureCollection getDigitalSignatures()
Returns the collection of signatures used to sign the presentation.
Read-only IDigitalSignatureCollection.
Presentation pres = new Presentation("SomePresentationSigned.pptx"); try { if (pres.getDigitalSignatures().size() > 0) { boolean allSignaturesAreValid = true; System.out.println("Signatures used to sign the presentation: "); for (IDigitalSignature signature : pres.getDigitalSignatures()) { System.out.println(signature.getCertificate().hashCode() + ", " + signature.getSignTime().toString() + " -- " + (signature.isValid() ? "VALID" : "INVALID")); allSignaturesAreValid &= signature.isValid(); } if (allSignaturesAreValid) System.out.println("Presentation is genuine, all signatures are valid."); else System.out.println("Presentation has been modified since signing."); } } finally { if (pres != null) pres.dispose(); }
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.void save(java.io.OutputStream stream,
int format)
Saves all slides of a presentation to a stream in the specified format.
stream - Output stream.format - Format of the exported data.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.
fname - Path to the created file.format - Format of the exported data.options - Additional format options.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.
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 formatvoid save(java.lang.String fname,
int[] slides,
int format)
Saves specified slides of a presentation to a file with the specified format.
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.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.
fname - Path to the created file.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.void save(java.io.OutputStream stream,
int[] slides,
int format)
Saves specified slides of a presentation to a stream in the specified format.
stream - Output stream.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.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.
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.void save(IXamlOptions options)
Saves all slides of a presentation to a set of files representing XAML markup.
Presentation pres = new Presentation("pres.pptx"); try { XamlOptions xamlOptions = new XamlOptions(); xamlOptions.setExportHiddenSlides(true); pres.save(xamlOptions); } finally { if (pres != null) pres.dispose(); }
options - The XAML format options.@Deprecated java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options)
Returns a Thumbnail BufferedImage objects for all slides of a presentation.
options - Rendering options.IImage[] getImages(IRenderingOptions options)
Returns a Thumbnail Image objects for all slides of a presentation.
options - Rendering options.@Deprecated java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, int[] slides)
Returns a Thumbnail BufferedImage objects for specified slides of a presentation.
options - Rendering options.slides - Array with slide positions, starting from 1.IImage[] getImages(IRenderingOptions options, int[] slides)
Returns a Thumbnail Image objects for specified slides of a presentation.
options - Rendering options.slides - Array with slide positions, starting from 1.@Deprecated java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, float scaleX, float scaleY)
Returns a Thumbnail BufferedImage objects for all slides of a presentation with custom scaling.
options - Rendering options.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.IImage[] getImages(IRenderingOptions options, float scaleX, float scaleY)
Returns a Thumbnail Image objects for all slides of a presentation with custom scaling.
options - Rendering options.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.@Deprecated java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, int[] slides, float scaleX, float scaleY)
Returns a Thumbnail BufferedImage objects for specified slides of a presentation with custom scaling.
options - Rendering options.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.IImage[] getImages(IRenderingOptions options, int[] slides, float scaleX, float scaleY)
Returns a Thumbnail Image objects for specified slides of a presentation with custom scaling.
options - Rendering options.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.@Deprecated java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, java.awt.Dimension imageSize)
Returns a Thumbnail BufferedImage objects for all slides of a presentation with specified size.
options - Rendering options.imageSize - Size of the image to create.IImage[] getImages(IRenderingOptions options, java.awt.Dimension imageSize)
Returns a Thumbnail Image objects for all slides of a presentation with specified size.
options - Rendering options.imageSize - Size of the image to create.@Deprecated java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, int[] slides, java.awt.Dimension imageSize)
Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size.
options - Rendering options.slides - Array with slide positions, starting from 1.imageSize - Size of the image to create.IImage[] getImages(IRenderingOptions options, int[] slides, java.awt.Dimension imageSize)
Returns a Thumbnail Image objects for specified slides of a presentation with specified size.
options - Rendering options.slides - Array with slide positions, starting from 1.imageSize - Size of the image to create.IBaseSlide getSlideById(long id)
Returns a Slide, MasterSlide or LayoutSlide by Id.
id - Id of a slide.void joinPortionsWithSameFormatting()
Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides.
void highlightText(java.lang.String text,
java.awt.Color highlightColor)
Highlights all matches of the sample text with the specified color.
The following code sample shows how to highlight text in a PowerPoint presentation.Presentation presentation = new Presentation("SomePresentation.pptx"); try { // highlighting all separate 'the' occurrences presentation.highlightText("the", Color.MAGENTA); presentation.save("SomePresentation-out2.pptx", SaveFormat.Pptx); } finally { if (presentation != null) presentation.dispose(); }
text - The text to highlight.highlightColor - The color to highlight the text.void highlightText(java.lang.String text,
java.awt.Color highlightColor,
ITextSearchOptions options,
IFindResultCallback callback)
Highlights all matches of the sample text with the specified color.
The following code sample shows how to highlight text in a PowerPoint presentation.Presentation presentation = new Presentation("SomePresentation.pptx"); try { // highlighting all separate 'the' occurrences presentation.highlightText("the", Color.MAGENTA); presentation.save("SomePresentation-out2.pptx", SaveFormat.Pptx); } finally { if (presentation != null) presentation.dispose(); }
text - The text to highlight.highlightColor - The color to highlight the text.options - Text search options ITextSearchOptions.callback - The callback object for receiving search results IFindResultCallback.void highlightRegex(java.util.regex.Pattern regex,
java.awt.Color highlightColor,
IFindResultCallback callback)
Highlights all matches of the regular expression with the specified color.
The following code sample shows how to highlight text in a PowerPoint Presentation using a regular expression.Presentation presentation = new Presentation("SomePresentation.pptx"); try { // highlighting all separate 'the' occurrences presentation.highlightText("the", Color.MAGENTA); presentation.save("SomePresentation-out2.pptx", SaveFormat.Pptx); } finally { if (presentation != null) presentation.dispose(); }
regex - The regular expression Pattern to get strings to highlight.highlightColor - The color to highlight the text.callback - The callback object for receiving search results IFindResultCallback.void replaceText(java.lang.String oldText,
java.lang.String newText,
ITextSearchOptions options,
IFindResultCallback callback)
Replaces all occurrences of the specified text with another specified text.
The following sample code shows how to replace one specified string with another specified string.Presentation presentation = new Presentation("SomePresentation.pptx") try { TextSearchOptions textSearchOptions = new TextSearchOptions(); textSearchOptions.setWholeWordsOnly(true); // Replace all separate 'the' occurrences with '***' presentation.replaceText("the", "***", textSearchOptions, null); presentation.save("SomePresentation-out2.pptx", SaveFormat.Pptx); } finally { if (presentation != null) presentation.dispose(); }
oldText - The string to be replaced.newText - The string to replace all occurrences of oldText.options - Text search options ITextSearchOptions.callback - The callback object for receiving search results IFindResultCallback.void replaceRegex(java.util.regex.Pattern regex,
java.lang.String newText,
IFindResultCallback callback)
Replaces all matches of the regular expression with the specified string.
The following code sample shows how to replace text using regular expression with the specified string.Presentation presentation = new Presentation("SomePresentation.pptx") try { TextSearchOptions textSearchOptions = new TextSearchOptions(); textSearchOptions.setWholeWordsOnly(true); // Replace all separate 'the' occurrences with '***' presentation.replaceText("the", "***", textSearchOptions, null); presentation.save("SomePresentation-out2.pptx", SaveFormat.Pptx); } finally { if (presentation != null) presentation.dispose(); }
regex - The regular expression Pattern to get strings to replace.newText - The string to replace all occurrences of the strings to be replaced.callback - The callback object for receiving search results IFindResultCallback.Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.