Aspose::Slides::Presentation Class Referencefinal

Represents a Microsoft PowerPoint presentation. More...

#include <Presentation.h>

Inherits Aspose::Slides::IPresentation, and Aspose::Slides::IDOMObject.

Public Member Functions

System::DateTime get_CurrentDateTime () override
 Returns date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Read System::DateTime. More...
 
void set_CurrentDateTime (System::DateTime value) override
 Sets date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Write System::DateTime. More...
 
System::SharedPtr< IPresentationHeaderFooterManagerget_HeaderFooterManager () override
 Returns actual HeaderFooter manager. Read-only IPresentationHeaderFooterManager. More...
 
System::SharedPtr< IProtectionManagerget_ProtectionManager () override
 Gets manager of the permissions for this presentation. Read-only IProtectionManager. More...
 
System::SharedPtr< ISlideCollectionget_Slides () override
 Returns a list of all slides that are defined in the presentation. Read-only ISlideCollection. More...
 
System::SharedPtr< ISectionCollectionget_Sections () override
 Returns a list of all slides sections that are defined in the presentation. Read-only ISectionCollection. More...
 
System::SharedPtr< ISlideSizeget_SlideSize () override
 Returns slide size object. Read-only ISlideSize. More...
 
System::SharedPtr< INotesSizeget_NotesSize () override
 Returns notes slide size object. Read-only INotesSize. More...
 
System::SharedPtr< IGlobalLayoutSlideCollectionget_LayoutSlides () override
 Returns a list of all layout slides that are defined in the presentation. Read-only IGlobalLayoutSlideCollection. More...
 
System::SharedPtr< IMasterSlideCollectionget_Masters () override
 Returns a list of all master slides that are defined in the presentation. Read-only IMasterSlideCollection. More...
 
System::SharedPtr< IMasterNotesSlideManagerget_MasterNotesSlideManager () override
 Returns notes master manager. Read-only IMasterNotesSlideManager. More...
 
System::SharedPtr< IMasterHandoutSlideManagerget_MasterHandoutSlideManager () override
 Returns handout master manager. Read-only IMasterHandoutSlideManager. More...
 
System::SharedPtr< IFontsManagerget_FontsManager () override
 Returns fonts manager. Read-only IFontsManager. More...
 
System::SharedPtr< ITextStyleget_DefaultTextStyle () override
 Returns default text style for shapes. Read-only ITextStyle. More...
 
System::SharedPtr< ICommentAuthorCollectionget_CommentAuthors () override
 Returns the collection of comments autors. Read-only ICommentAuthorCollection. More...
 
System::SharedPtr< IDocumentPropertiesget_DocumentProperties () override
 Returns DocumentProperties object which contains standard and custom document properties. Read-only IDocumentProperties. More...
 
System::SharedPtr< IImageCollectionget_Images () override
 Returns the collection of all images in the presentation. Read-only IImageCollection. More...
 
System::SharedPtr< IAudioCollectionget_Audios () override
 Returns the collection of all embedded audio files in the presentation. Read-only IAudioCollection. More...
 
System::SharedPtr< IVideoCollectionget_Videos () override
 Returns the collection of all embedded video files in the presentation. Read-only IVideoCollection. More...
 
System::SharedPtr< Aspose::Slides::SlideShowSettingsget_SlideShowSettings () const
 Returns the slide show settings for the presentation. More...
 
System::SharedPtr< IDigitalSignatureCollectionget_DigitalSignatures () override
 Returns the collection of signatures used to sign the presentation. Read-only IDigitalSignatureCollection. More...
 
System::SharedPtr< ICustomDataget_CustomData () override
 Returns the presentation's custom data. Read-only ICustomData. More...
 
System::ArrayPtr< System::SharedPtr< ICustomXmlPart > > get_AllCustomXmlParts () override
 Returns all custom data parts in the presentaion. Read-only ICustomXmlPart[]. More...
 
System::SharedPtr< Vba::IVbaProjectget_VbaProject () override
 Gets VBA project with presentation macros. Read Vba::IVbaProject. More...
 
void set_VbaProject (System::SharedPtr< Vba::IVbaProject > value) override
 Sets VBA project with presentation macros. Write Vba::IVbaProject. More...
 
System::SharedPtr< IHyperlinkQueriesget_HyperlinkQueries () override
 Provides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides). Read-only IHyperlinkQueries. More...
 
System::SharedPtr< IViewPropertiesget_ViewProperties () override
 Gets presentation wide view properties. Read-only IViewProperties. More...
 
int32_t get_FirstSlideNumber () override
 Represents the first slide number in the presentation More...
 
void set_FirstSlideNumber (int32_t value) override
 Represents the first slide number in the presentation More...
 
Aspose::Slides::SourceFormat get_SourceFormat () override
 Returns information about from which format presentation was loaded. Read-only SourceFormat. More...
 
System::SharedPtr< Theme::IMasterThemeget_MasterTheme () override
 Returns master theme. Read-only Theme::IMasterTheme. More...
 
 Presentation ()
 This constructor creates new presentation from scratch. Created presentation has one empty slide. More...
 
 Presentation (System::SharedPtr< Aspose::Slides::LoadOptions > loadOptions)
 This constructor creates new presentation from scratch. Created presentation has one empty slide. More...
 
 Presentation (System::SharedPtr< System::IO::Stream > stream)
 This constructor is the primary mechanism for reading an existing Presentation. More...
 
 Presentation (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< Aspose::Slides::LoadOptions > loadOptions)
 This constructor is the primary mechanism for reading an existing Presentation. More...
 
 Presentation (System::String file)
 This constructor gets a source file path from which the contents of the Presentation are read. More...
 
 Presentation (System::String file, System::SharedPtr< Aspose::Slides::LoadOptions > loadOptions)
 This constructor gets a source file path from which the contents of the Presentation are read. More...
 
System::SharedPtr< IBaseSlideGetSlideById (uint32_t id) override
 Returns a Slide, MasterSlide or LayoutSlide by Id. More...
 
void Save (System::String fname, Export::SaveFormat format) override
 Saves all slides of a presentation to a file with the specified format. More...
 
void Save (System::SharedPtr< System::IO::Stream > stream, Export::SaveFormat format) override
 Saves all slides of a presentation to a stream in the specified format. More...
 
void Save (System::String fname, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options) override
 Saves all slides of a presentation to a file with the specified format and with additional options. More...
 
void Save (System::SharedPtr< System::IO::Stream > stream, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options) override
 Saves all slides of a presentation to a stream in the specified format and with additional options. More...
 
void Save (System::SharedPtr< Export::Xaml::IXamlOptions > options) override
 Saves all slides of a presentation to a set of files representing XAML markup. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting) override
 Returns a Thumbnail Bitmap objects for all slides of a presentation. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::ArrayPtr< int32_t > slides) override
 Returns a Thumbnail Bitmap objects for specified slides of a presentation. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, float scaleX, float scaleY) override
 Returns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::ArrayPtr< int32_t > slides, float scaleX, float scaleY) override
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::Drawing::Size imageSize) override
 Returns a Thumbnail Bitmap objects for all slides of a presentation with specified size. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::ArrayPtr< int32_t > slides, System::Drawing::Size imageSize) override
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options) override
 Returns a Thumbnail Bitmap objects for all slides of a presentation. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::ArrayPtr< int32_t > slides) override
 Returns a Thumbnail Bitmap objects for specified slides of a presentation. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, float scaleX, float scaleY) override
 Returns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::ArrayPtr< int32_t > slides, float scaleX, float scaleY) override
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::Drawing::Size imageSize) override
 Returns a Thumbnail Bitmap objects for all slides of a presentation with specified size. More...
 
System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::ArrayPtr< int32_t > slides, System::Drawing::Size imageSize) override
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size. More...
 
void Save (System::String fname, System::ArrayPtr< int32_t > slides, Export::SaveFormat format) override
 Saves specified slides of a presentation to a file with the specified format with page number keeping. More...
 
void Save (System::String fname, System::ArrayPtr< int32_t > slides, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options) override
 Saves specified slides of a presentation to a file with the specified format with page number keeping. More...
 
void Save (System::SharedPtr< System::IO::Stream > stream, System::ArrayPtr< int32_t > slides, Export::SaveFormat format) override
 Saves specified slides of a presentation to a stream in the specified format with page number keeping. More...
 
void Save (System::SharedPtr< System::IO::Stream > stream, System::ArrayPtr< int32_t > slides, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options) override
 Saves specified slides of a presentation to a stream in the specified format with page number keeping. More...
 
void Save (System::String fname, Export::SaveFormat format, System::SharedPtr< System::Web::HttpResponse > response, bool showInline) override
 Sends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide. More...
 
void Save (System::String fname, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options, System::SharedPtr< System::Web::HttpResponse > response, bool showInline) override
 Sends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide. More...
 
void JoinPortionsWithSameFormatting () override
 Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides. More...
 
void Dispose () override
 Releases all resources used by this Presentation object. More...
 
System::SharedPtr< ISlideget_Slide (int32_t index) override
 Returns a slide defined in the presentation at the specified index. Read-only Aspose::Slides::ISlide. More...
 
System::SharedPtr< ISectionget_Section (int32_t index) override
 Returns a slide section defined in the presentation at the specified index. Read-only Aspose::Slides::ISection More...
 
System::SharedPtr< IMasterSlideget_Master (int32_t index) override
 Returns a master slide defined in the presentation at the specified index. Read-only Aspose::Slides::IMasterSlide More...
 
System::SharedPtr< ICommentAuthorget_CommentAuthor (int32_t index) override
 Returns the comment author at the specified index. Read-only Aspose::Slides::ICommentAuthor More...
 
System::SharedPtr< System::Objectget_DocumentProperty (System::String name) override
 Returns custom property defined by name. More...
 
System::SharedPtr< IPPImageget_Image (int32_t index) override
 Returns image in the presentation at the specified index. More...
 
System::SharedPtr< IAudioget_Audio (int32_t index) override
 Return embedded audio file in the presentation at the specified index. Read-only Aspose::Slides::IAudio More...
 
System::SharedPtr< IVideoget_Video (int32_t index) override
 Return embedded video file in the presentation at the specified index. Read-only Aspose::Slides::IVideo More...
 
System::SharedPtr< IDigitalSignatureget_DigitalSignature (int32_t index) override
 Returns digital signature used to sign the presentation at the specified index. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::DateTime get_CurrentDateTime ()=0
 Returns date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Read System::DateTime. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void set_CurrentDateTime (System::DateTime value)=0
 Sets date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Write System::DateTime. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IPresentationHeaderFooterManagerget_HeaderFooterManager ()=0
 Returns HeaderFooter manager of the presentation. Read-only IPresentationHeaderFooterManager. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IProtectionManagerget_ProtectionManager ()=0
 Gets manager of the permissions for this presentation. Read-only IProtectionManager. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ISlideCollectionget_Slides ()=0
 Returns a list of all slides that are defined in the presentation. Read-only ISlideCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ISectionCollectionget_Sections ()=0
 Returns a list of all slides sections that are defined in the presentation. Read-only ISectionCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ISlideSizeget_SlideSize ()=0
 Returns slide size object. Read-only ISlideSize. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< INotesSizeget_NotesSize ()=0
 Returns notes slide size object. Read-only INotesSize. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IGlobalLayoutSlideCollectionget_LayoutSlides ()=0
 Returns a list of all layout slides that are defined in the presentation. Read-only IGlobalLayoutSlideCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IMasterSlideCollectionget_Masters ()=0
 Returns a list of all master slides that are defined in the presentation. Read-only IMasterSlideCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IMasterNotesSlideManagerget_MasterNotesSlideManager ()=0
 Returns notes master manager. Read-only IMasterNotesSlideManager. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IMasterHandoutSlideManagerget_MasterHandoutSlideManager ()=0
 Returns handout master manager. Read-only IMasterHandoutSlideManager. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IFontsManagerget_FontsManager ()=0
 Returns fonts manager. Read-only IFontsManager. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ITextStyleget_DefaultTextStyle ()=0
 Returns default text style for shapes. Read-only ITextStyle. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ICommentAuthorCollectionget_CommentAuthors ()=0
 Returns the collection of comments autors. Read-only ICommentAuthorCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IDocumentPropertiesget_DocumentProperties ()=0
 Returns DocumentProperties object which contains standard and custom document properties. Read-only IDocumentProperties. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IImageCollectionget_Images ()=0
 Returns the collection of all images in the presentation. Read-only IImageCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IAudioCollectionget_Audios ()=0
 Returns the collection of all embedded audio files in the presentation. Read-only IAudioCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IVideoCollectionget_Videos ()=0
 Returns the collection of all embedded video files in the presentation. Read-only IVideoCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ICustomDataget_CustomData ()=0
 Returns the presentation's custom data. Read-only ICustomData. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< Vba::IVbaProjectget_VbaProject ()=0
 Gets VBA project with presentation macros. Read Vba::IVbaProject. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void set_VbaProject (System::SharedPtr< Vba::IVbaProject > value)=0
 Gets VBA project with presentation macros. Write Vba::IVbaProject. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API Aspose::Slides::SourceFormat get_SourceFormat ()=0
 Returns information about from which format presentation was loaded. Read-only IPresentation::get_SourceFormat. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< Theme::IMasterThemeget_MasterTheme ()=0
 Returns master theme of the presentation. Read-only Theme::IMasterTheme. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IHyperlinkQueriesget_HyperlinkQueries ()=0
 Provides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides). Read-only IHyperlinkQueries. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IViewPropertiesget_ViewProperties ()=0
 Gets presentation wide view properties. Read-only IViewProperties. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API int32_t get_FirstSlideNumber ()=0
 Represents the first slide number in the presentation. Read int32_t. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void set_FirstSlideNumber (int32_t value)=0
 Represents the first slide number in the presentation. Write int32_t. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< ICustomXmlPart > > get_AllCustomXmlParts ()=0
 Returns all custom data parts in the presentaion. Read-only ICustomXmlPart[]. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IDigitalSignatureCollectionget_DigitalSignatures ()=0
 Returns the collection of signatures used to sign the presentation. Read-only IDigitalSignatureCollection. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::String fname, Export::SaveFormat format)=0
 Saves all slides of a presentation to a file with the specified format. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::SharedPtr< System::IO::Stream > stream, Export::SaveFormat format)=0
 Saves all slides of a presentation to a stream in the specified format. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::String fname, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options)=0
 Saves all slides of a presentation to a file with the specified format and with additional options. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::SharedPtr< System::IO::Stream > stream, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options)=0
 Saves all slides of a presentation to a stream in the specified format and with additional options. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::String fname, System::ArrayPtr< int32_t > slides, Export::SaveFormat format)=0
 Saves specified slides of a presentation to a file with the specified format. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::String fname, System::ArrayPtr< int32_t > slides, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options)=0
 Saves specified slides of a presentation to a file with the specified format. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::SharedPtr< System::IO::Stream > stream, System::ArrayPtr< int32_t > slides, Export::SaveFormat format)=0
 Saves specified slides of a presentation to a stream in the specified format. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::SharedPtr< System::IO::Stream > stream, System::ArrayPtr< int32_t > slides, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options)=0
 Saves specified slides of a presentation to a stream in the specified format. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::SharedPtr< Export::Xaml::IXamlOptions > options)=0
 Saves all slides of a presentation to a set of files representing XAML markup. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting)=0
 Returns a Thumbnail Bitmap objects for all slides of a presentation. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::ArrayPtr< int32_t > slides)=0
 Returns a Thumbnail Bitmap objects for specified slides of a presentation. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, float scaleX, float scaleY)=0
 Returns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::ArrayPtr< int32_t > slides, float scaleX, float scaleY)=0
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::Drawing::Size imageSize)=0
 Returns a Thumbnail Bitmap objects for all slides of a presentation with specified size. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::INotesCommentsLayoutingOptions > notesCommentsLayouting, System::ArrayPtr< int32_t > slides, System::Drawing::Size imageSize)=0
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options)=0
 Returns a Thumbnail Bitmap objects for all slides of a presentation. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::ArrayPtr< int32_t > slides)=0
 Returns a Thumbnail Bitmap objects for specified slides of a presentation. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, float scaleX, float scaleY)=0
 Returns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::ArrayPtr< int32_t > slides, float scaleX, float scaleY)=0
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::Drawing::Size imageSize)=0
 Returns a Thumbnail Bitmap objects for all slides of a presentation with specified size. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > GetThumbnails (System::SharedPtr< Export::IRenderingOptions > options, System::ArrayPtr< int32_t > slides, System::Drawing::Size imageSize)=0
 Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::String fname, Export::SaveFormat format, System::SharedPtr< System::Web::HttpResponse > response, bool showInline)=0
 Sends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void Save (System::String fname, Export::SaveFormat format, System::SharedPtr< Export::ISaveOptions > options, System::SharedPtr< System::Web::HttpResponse > response, bool showInline)=0
 Sends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IBaseSlideGetSlideById (uint32_t id)=0
 Returns a Slide, MasterSlide or LayoutSlide by Id. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API void JoinPortionsWithSameFormatting ()=0
 Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ISlideget_Slide (int32_t index)=0
 Returns a slide defined in the presentation at the specified index. Read-only Aspose::Slides::ISlide. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ISectionget_Section (int32_t index)=0
 Returns a slide section defined in the presentation at the specified index. Read-only Aspose::Slides::ISection More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IMasterSlideget_Master (int32_t index)=0
 Returns a master slide defined in the presentation at the specified index. Read-only Aspose::Slides::IMasterSlide More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< ICommentAuthorget_CommentAuthor (int32_t index)=0
 Returns the comment author at the specified index. Read-only Aspose::Slides::ICommentAuthor More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< System::Objectget_DocumentProperty (System::String name)=0
 Returns custom property defined by name. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IPPImageget_Image (int32_t index)=0
 Returns image in the presentation at the specified index. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IAudioget_Audio (int32_t index)=0
 Return embedded audio file in the presentation at the specified index. Read-only Aspose::Slides::IAudio More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IVideoget_Video (int32_t index)=0
 Return embedded video file in the presentation at the specified index. Read-only Aspose::Slides::IVideo More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IDigitalSignatureget_DigitalSignature (int32_t index)=0
 Returns digital signature used to sign the presentation at the specified index. More...
 
virtual ASPOSE_SLIDES_API_LOCAL_API System::SharedPtr< IPresentationget_Presentation ()=0
 Returns the presentation. Read-only IPresentation. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 
virtual void Dispose ()
 Does nothing. More...
 
virtual ASPOSE_SLIDES_LOCAL_API System::SharedPtr< IDOMObjectget_Parent_Immediate ()=0
 Returns Parent_Immediate object. Read-only IDOMObject. More...
 

Protected Member Functions

virtual ~Presentation ()
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 

Detailed Description

Represents a Microsoft PowerPoint presentation.

The following example shows how to create PowerPoint Presentation.

// Instantiate a Presentation object that represents a presentation file
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>();
// Get the first slide
auto slide = presentation->get_Slides()->idx_get(0);
// Add an autoshape of type line
slide->get_Shapes()->AddAutoShape(ShapeType::Line, 50.0f, 150.0f, 300.0f, 0.0f);
// Save the presentation file.
presentation->Save(u"NewPresentation_out.pptx", SaveFormat::Pptx);
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:178

The following example shows how to open and save Presentation.

// Load any supported file in Presentation e.g. ppt, pptx, odp etc.
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"Sample.odp");
// Save the presentation file.
presentation->Save(u"OutputPresenation.pptx", SaveFormat::Pptx);

Constructor & Destructor Documentation

◆ Presentation() [1/6]

Aspose::Slides::Presentation::Presentation ( )

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

◆ Presentation() [2/6]

Aspose::Slides::Presentation::Presentation ( System::SharedPtr< Aspose::Slides::LoadOptions loadOptions)

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

Parameters
loadOptionsAdditional load options.

◆ Presentation() [3/6]

Aspose::Slides::Presentation::Presentation ( System::SharedPtr< System::IO::Stream stream)

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

Parameters
streamInput stream.
auto fis = MakeObject<IO::FileStream>(u"demo.pptx", IO::FileMode::Open, IO::FileAccess::Read);
auto pres = MakeObject<Presentation>(fis);
fis->Close();

◆ Presentation() [4/6]

Aspose::Slides::Presentation::Presentation ( System::SharedPtr< System::IO::Stream stream,
System::SharedPtr< Aspose::Slides::LoadOptions loadOptions 
)

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

Parameters
streamInput stream.
loadOptionsAdditional load options.

◆ Presentation() [5/6]

Aspose::Slides::Presentation::Presentation ( System::String  file)

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

Parameters
fileInput file.
Exceptions
System::ArgumentExceptionThrown when input file has zero length
auto pres = MakeObject<Presentation>(u"demo.pptx");

◆ Presentation() [6/6]

Aspose::Slides::Presentation::Presentation ( System::String  file,
System::SharedPtr< Aspose::Slides::LoadOptions loadOptions 
)

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

Parameters
fileInput file.
loadOptionsAdditional load options.
Exceptions
System::ArgumentExceptionThrown when input file has zero length

◆ ~Presentation()

virtual Aspose::Slides::Presentation::~Presentation ( )
protectedvirtual

Member Function Documentation

◆ Dispose()

void Aspose::Slides::Presentation::Dispose ( )
overridevirtual

Releases all resources used by this Presentation object.

Reimplemented from System::IDisposable.

◆ get_AllCustomXmlParts()

System::ArrayPtr< System::SharedPtr< ICustomXmlPart > > Aspose::Slides::Presentation::get_AllCustomXmlParts ( )
overridevirtual

Returns all custom data parts in the presentaion. Read-only ICustomXmlPart[].

The following examples show how to clear all custom xml parts from PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>(u"PresentationWithCustomXml.pptx");
// Iterate all custom XML Parts
for (System::SharedPtr<ICustomXmlPart> item : pres->get_AllCustomXmlParts())
{
item->Remove();
}
pres->Save(u"out.pptx", SaveFormat::Pptx);

Implements Aspose::Slides::IPresentation.

◆ get_Audio()

System::SharedPtr< IAudio > Aspose::Slides::Presentation::get_Audio ( int32_t  index)
overridevirtual

Return embedded audio file in the presentation at the specified index. Read-only Aspose::Slides::IAudio

Implements Aspose::Slides::IPresentation.

◆ get_Audios()

System::SharedPtr< IAudioCollection > Aspose::Slides::Presentation::get_Audios ( )
overridevirtual

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

The following examples shows how to add a hyperlink to an audio file.

auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);
System::SharedPtr<IAudio> audio = pres->get_Audios()->AddAudio(System::IO::File::ReadAllBytes(u"audio.mp3"));
System::SharedPtr<IAudioFrame> audioFrame = slide->get_Shapes()->AddAudioFrameEmbedded(10.0f, 10.0f, 100.0f, 100.0f, audio);
audioFrame->set_HyperlinkClick(System::MakeObject<Hyperlink>(u"https://www.aspose.com/"));
audioFrame->get_HyperlinkClick()->set_Tooltip(u"More than 70% Fortune 100 companies trust Aspose APIs");
pres->Save(u"pres-out.pptx", SaveFormat::Pptx);
static ArrayPtr< uint8_t > ReadAllBytes(const String &path)
Reads the content of the specified binary file to a byte array.

Implements Aspose::Slides::IPresentation.

◆ get_CommentAuthor()

System::SharedPtr< ICommentAuthor > Aspose::Slides::Presentation::get_CommentAuthor ( int32_t  index)
overridevirtual

Returns the comment author at the specified index. Read-only Aspose::Slides::ICommentAuthor

Implements Aspose::Slides::IPresentation.

◆ get_CommentAuthors()

System::SharedPtr< ICommentAuthorCollection > Aspose::Slides::Presentation::get_CommentAuthors ( )
overridevirtual

Returns the collection of comments autors. Read-only ICommentAuthorCollection.

Implements Aspose::Slides::IPresentation.

◆ get_CurrentDateTime()

System::DateTime Aspose::Slides::Presentation::get_CurrentDateTime ( )
overridevirtual

Returns date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Read System::DateTime.

Implements Aspose::Slides::IPresentation.

◆ get_CustomData()

System::SharedPtr< ICustomData > Aspose::Slides::Presentation::get_CustomData ( )
overridevirtual

Returns the presentation's custom data. Read-only ICustomData.

Implements Aspose::Slides::IPresentation.

◆ get_DefaultTextStyle()

System::SharedPtr< ITextStyle > Aspose::Slides::Presentation::get_DefaultTextStyle ( )
overridevirtual

Returns default text style for shapes. Read-only ITextStyle.

Implements Aspose::Slides::IPresentation.

◆ get_DigitalSignature()

System::SharedPtr< IDigitalSignature > Aspose::Slides::Presentation::get_DigitalSignature ( int32_t  index)
overridevirtual

Returns digital signature used to sign the presentation at the specified index.

Implements Aspose::Slides::IPresentation.

◆ get_DigitalSignatures()

System::SharedPtr< IDigitalSignatureCollection > Aspose::Slides::Presentation::get_DigitalSignatures ( )
overridevirtual

Returns the collection of signatures used to sign the presentation. Read-only IDigitalSignatureCollection.

auto pres = System::MakeObject<Presentation>(u"SomePresentationSigned.pptx");
if (pres->get_DigitalSignatures()->get_Count() > 0)
{
bool allSignaturesAreValid = true;
System::Console::WriteLine(u"Signatures used to sign the presentation: ");
for (int i = 0; i < pres->get_DigitalSignatures()->get_Count(); ++i)
{
auto signature = pres->get_DigitalSignatures()->idx_get(i);
System::Console::WriteLine(u"{0}, {1} --- {2}",
signature->get_Certificate()->get_SubjectName()->get_Name(),
signature->get_SignTime().ToString(u"yyyy-MM-dd HH:mm"),
(signature->get_IsValid() ? u"VALID" : u"INVALID")
);
allSignaturesAreValid &= signature->get_IsValid();
}
}
@verbatim
if (allSignaturesAreValid)
System::Console::WriteLine(u"Presentation is genuine, all signatures are valid.");
else
System::Console::WriteLine(u"Presentation has been modified since signing.");
@endverbatim }
static void WriteLine()
Outputs the current line terminator to the standard output stream.

Implements Aspose::Slides::IPresentation.

◆ get_DocumentProperties()

System::SharedPtr< IDocumentProperties > Aspose::Slides::Presentation::get_DocumentProperties ( )
overridevirtual

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

Implements Aspose::Slides::IPresentation.

◆ get_DocumentProperty()

System::SharedPtr< System::Object > Aspose::Slides::Presentation::get_DocumentProperty ( System::String  name)
overridevirtual

Returns custom property defined by name.

Value can be int, float, double, string, bool or DateTime.

Implements Aspose::Slides::IPresentation.

◆ get_FirstSlideNumber()

int32_t Aspose::Slides::Presentation::get_FirstSlideNumber ( )
overridevirtual

Represents the first slide number in the presentation

Implements Aspose::Slides::IPresentation.

◆ get_FontsManager()

System::SharedPtr< IFontsManager > Aspose::Slides::Presentation::get_FontsManager ( )
overridevirtual

Returns fonts manager. Read-only IFontsManager.

The following example shows how to add embedded fonts to PowerPoint Presentation.

auto presentation = System::MakeObject<Presentation>(u"Fonts.pptx");
System::ArrayPtr<System::SharedPtr<IFontData>> allFonts = presentation->get_FontsManager()->GetFonts();
System::ArrayPtr<System::SharedPtr<IFontData>> embeddedFonts = presentation->get_FontsManager()->GetEmbeddedFonts();
for (auto&& font : allFonts)
{
if (!embeddedFonts->Contains(font))
{
presentation->get_FontsManager()->AddEmbeddedFont(font, EmbedFontCharacters::All);
}
}
// Save the presentation
presentation->Save(u"AddEmbeddedFont_out.pptx", SaveFormat::Pptx);


Implements Aspose::Slides::IPresentation.

◆ get_HeaderFooterManager()

System::SharedPtr< IPresentationHeaderFooterManager > Aspose::Slides::Presentation::get_HeaderFooterManager ( )
overridevirtual

Returns actual HeaderFooter manager. Read-only IPresentationHeaderFooterManager.

The following example shows how to set footer visibility inside Slide of PowerPoint Presentation.

auto presentation = System::MakeObject<Presentation>(u"presentation.ppt");
auto slide = presentation->get_Slides()->idx_get(0);
System::SharedPtr<IBaseSlideHeaderFooterManager> headerFooterManager = slide->get_HeaderFooterManager();
// Property IsFooterVisible is used for indicating that a slide footer placeholder is not present.
if (!headerFooterManager->get_IsFooterVisible())
{
// Method SetFooterVisibility is used for making a slide footer placeholder visible.
headerFooterManager->SetFooterVisibility(true);
}
// Property IsSlideNumberVisible is used for indicating that a slide page number placeholder is not present.
if (!headerFooterManager->get_IsSlideNumberVisible())
{
// Method SetSlideNumberVisibility is used for making a slide page number placeholder visible.
headerFooterManager->SetSlideNumberVisibility(true);
}
// Property IsDateTimeVisible is used for indicating that a slide date-time placeholder is not present.
if (!headerFooterManager->get_IsDateTimeVisible())
{
// Method SetFooterVisibility is used for making a slide date-time placeholder visible.
headerFooterManager->SetDateTimeVisibility(true);
}
// Method SetFooterText is used for setting text to slide footer placeholder.
headerFooterManager->SetFooterText(u"Footer text");
// Method SetDateTimeText is used for setting text to slide date-time placeholder.
headerFooterManager->SetDateTimeText(u"Date and time text");
presentation->Save(u"Presentation.ppt", SaveFormat::Ppt);

The following example shows how to set child footer visibility inside Slide.

auto presentation = System::MakeObject<Presentation>(u"presentation.ppt");
System::SharedPtr<IMasterSlideHeaderFooterManager> headerFooterManager = presentation->get_Masters()->idx_get(0)->get_HeaderFooterManager();
// Method SetFooterAndChildFootersVisibility is used for making a master slide and all child footer placeholders visible.
headerFooterManager->SetFooterAndChildFootersVisibility(true);
// Method SetSlideNumberAndChildSlideNumbersVisibility is used for making a master slide and all child page number placeholders visible.
headerFooterManager->SetSlideNumberAndChildSlideNumbersVisibility(true);
// Method SetDateTimeAndChildDateTimesVisibility is used for making a master slide and all child date-time placeholders visible.
headerFooterManager->SetDateTimeAndChildDateTimesVisibility(true);
// Method SetFooterAndChildFootersText is used for setting text to master slide and all child footer placeholders.
headerFooterManager->SetFooterAndChildFootersText(u"Footer text");
// Method SetDateTimeAndChildDateTimesText is used for setting text to master slide and all child date-time placeholders.
headerFooterManager->SetDateTimeAndChildDateTimesText(u"Date and time text");

Implements Aspose::Slides::IPresentation.

◆ get_HyperlinkQueries()

System::SharedPtr< IHyperlinkQueries > Aspose::Slides::Presentation::get_HyperlinkQueries ( )
overridevirtual

Provides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides). Read-only IHyperlinkQueries.

Implements Aspose::Slides::IPresentation.

◆ get_Image()

System::SharedPtr< IPPImage > Aspose::Slides::Presentation::get_Image ( int32_t  index)
overridevirtual

Returns image in the presentation at the specified index.

Implements Aspose::Slides::IPresentation.

◆ get_Images()

System::SharedPtr< IImageCollection > Aspose::Slides::Presentation::get_Images ( )
overridevirtual

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

The following examples shows how to add image as BLOB in PowerPoint Presentation.

System::String pathToLargeImage = u"large_image.jpg";
// creates a new presentation to which the image will be added.
auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);
auto fileStream = System::MakeObject<System::IO::FileStream>(pathToLargeImage, System::IO::FileMode::Open);
// Let's add the image to the presentation - we choose KeepLocked behavior because we do
// NOT intend to access the "largeImage.png" file.
auto img = pres->get_Images()->AddImage(fileStream, LoadingStreamBehavior::KeepLocked);
slide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 0.0f, 0.0f, 300.0f, 200.0f, img);
// Saves the presentation. While a large presentation gets outputted, the memory consumption
// stays low through the pres object's lifecycle
pres->Save(u"presentationWithLargeImage.pptx", SaveFormat::Pptx);
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
@ KeepLocked
The stream will be locked inside the IPresentation object, i.e. the ownership of the stream will be t...
@ Rectangle
Rectangle Shape.
@ Open
Open an existing file. If the file does not exist, an exception is thrown.

The following examples add a hyperlink to an image in a PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);
// Adds image to presentation
auto image = pres->get_Images()->AddImage(System::IO::File::ReadAllBytes(u"image.png"));
// Creates picture frame on slide 1 based on previously added image
auto pictureFrame = slide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 10.0f, 10.0f, 100.0f, 100.0f, image);
pictureFrame->set_HyperlinkClick(System::MakeObject<Hyperlink>(u"https://www.aspose.com/"));
pictureFrame->get_HyperlinkClick()->set_Tooltip(u"More than 70% Fortune 100 companies trust Aspose APIs");
pres->Save(u"pres-out.pptx", SaveFormat::Pptx);

Implements Aspose::Slides::IPresentation.

◆ get_LayoutSlides()

System::SharedPtr< IGlobalLayoutSlideCollection > Aspose::Slides::Presentation::get_LayoutSlides ( )
overridevirtual

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

You can access to alternative API for adding/inserting/removing/cloning layout slides by using IMasterSlide::get_LayoutSlides property.

Implements Aspose::Slides::IPresentation.

◆ get_Master()

System::SharedPtr< IMasterSlide > Aspose::Slides::Presentation::get_Master ( int32_t  index)
overridevirtual

Returns a master slide defined in the presentation at the specified index. Read-only Aspose::Slides::IMasterSlide

Implements Aspose::Slides::IPresentation.

◆ get_MasterHandoutSlideManager()

System::SharedPtr< IMasterHandoutSlideManager > Aspose::Slides::Presentation::get_MasterHandoutSlideManager ( )
overridevirtual

Returns handout master manager. Read-only IMasterHandoutSlideManager.

Implements Aspose::Slides::IPresentation.

◆ get_MasterNotesSlideManager()

System::SharedPtr< IMasterNotesSlideManager > Aspose::Slides::Presentation::get_MasterNotesSlideManager ( )
overridevirtual

Returns notes master manager. Read-only IMasterNotesSlideManager.

Implements Aspose::Slides::IPresentation.

◆ get_Masters()

System::SharedPtr< IMasterSlideCollection > Aspose::Slides::Presentation::get_Masters ( )
overridevirtual

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

The following examples shows how to adding Images to Master Slides of PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);
auto masterSlide = slide->get_LayoutSlide()->get_MasterSlide();
auto image = pres->get_Images()->AddImage(System::IO::File::ReadAllBytes(u"image.png"));
masterSlide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 10.0f, 10.0f, 100.0f, 100.0f, image);
pres->Save(u"pres.pptx", SaveFormat::Pptx);

The following examples shows how to change the background color of the master slide of PowerPoint Presentation.

// Instantiate the Presentation class that represents the presentation file
auto pres = System::MakeObject<Presentation>();
// Set the background color of the Master ISlide to Forest Green
auto masterSlide = pres->get_Masters()->idx_get(0);
auto background = masterSlide->get_Background();
background->set_Type(BackgroundType::OwnBackground);
background->get_FillFormat()->set_FillType(FillType::Solid);
background->get_FillFormat()->get_SolidFillColor()->set_Color(System::Drawing::Color::get_ForestGreen());
// Write the presentation to disk
pres->Save(u"SetSlideBackgroundMaster_out.pptx", SaveFormat::Pptx);
static Color get_ForestGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF228B22.
@ Solid
Filled with a solid color.

The following examples shows how to add slide layout to PowerPoint Presentation.

// Instantiate Presentation class that represents the presentation file
auto presentation = System::MakeObject<Presentation>(u"AccessSlides.pptx");
// Try to search by layout slide type
auto layoutSlides = presentation->get_Masters()->idx_get(0)->get_LayoutSlides();
auto layoutSlide = System::ObjectExt::Coalesce(
layoutSlides->GetByType(SlideLayoutType::TitleAndObject),
[&](){ return layoutSlides->GetByType(SlideLayoutType::Title); });
if (layoutSlide == nullptr)
{
// The situation when a presentation doesn't contain some type of layouts.
// presentation File only contains Blank and Custom layout types.
// But layout slides with Custom types has different slide names,
// like "Title", "Title and Content", etc. And it is possible to use these
// names for layout slide selection.
// Also it is possible to use the set of placeholder shape types. For example,
// Title slide should have only Title pleceholder type, etc.
for (auto&& titleAndObjectLayoutSlide : layoutSlides)
{
if (titleAndObjectLayoutSlide->get_Name() == u"Title and Object")
{
layoutSlide = titleAndObjectLayoutSlide;
break;
}
}
if (layoutSlide == nullptr)
{
for (auto&& titleLayoutSlide : layoutSlides)
{
if (titleLayoutSlide->get_Name() == u"Title")
{
layoutSlide = titleLayoutSlide;
break;
}
}
if (layoutSlide == nullptr)
{
layoutSlide = layoutSlides->GetByType(SlideLayoutType::Blank);
if (layoutSlide == nullptr)
{
layoutSlide = layoutSlides->Add(SlideLayoutType::TitleAndObject, u"Title and Object");
}
}
}
}
// Adding empty slide with added layout slide
presentation->get_Slides()->InsertEmptySlide(0, layoutSlide);
// Save presentation
presentation->Save(u"AddLayoutSlides_out.pptx", SaveFormat::Pptx);
static auto Coalesce(T0 value, T1 func)
Implementation of '?' operator translation for non-nullable types.
Definition: object_ext.h:819
@ TitleAndObject
Title and Object

Implements Aspose::Slides::IPresentation.

◆ get_MasterTheme()

System::SharedPtr< Theme::IMasterTheme > Aspose::Slides::Presentation::get_MasterTheme ( )
overridevirtual

Returns master theme. Read-only Theme::IMasterTheme.

The following examples shows how to change a theme effect by altering parts of elements of PowerPoint Presentation.

// Instantiate a presentation object that represents a presentation file
auto pres = System::MakeObject<Presentation>(u"Subtle_Moderate_Intense.pptx");
auto masterTheme = pres->get_MasterTheme();
auto formatScheme = masterTheme->get_FormatScheme();
formatScheme->get_LineStyles()->idx_get(0)->get_FillFormat()->get_SolidFillColor()->set_Color(System::Drawing::Color::get_Red());
formatScheme->get_FillStyles()->idx_get(2)->set_FillType(FillType::Solid);
formatScheme->get_FillStyles()->idx_get(2)->get_SolidFillColor()->set_Color(System::Drawing::Color::get_ForestGreen());
formatScheme->get_EffectStyles()->idx_get(2)->get_EffectFormat()->get_OuterShadowEffect()->set_Distance(10.0f);
pres->Save(u"Design_04_Subtle_Moderate_Intense-out.pptx", SaveFormat::Pptx);
static Color get_Red()
Returns a color whose ARGB value in hexadecimal notation is #FFFF0000.

Implements Aspose::Slides::IPresentation.

◆ get_NotesSize()

System::SharedPtr< INotesSize > Aspose::Slides::Presentation::get_NotesSize ( )
overridevirtual

Returns notes slide size object. Read-only INotesSize.

Implements Aspose::Slides::IPresentation.

◆ get_ProtectionManager()

System::SharedPtr< IProtectionManager > Aspose::Slides::Presentation::get_ProtectionManager ( )
overridevirtual

Gets manager of the permissions for this presentation. Read-only IProtectionManager.

Implements Aspose::Slides::IPresentation.

◆ get_Section()

System::SharedPtr< ISection > Aspose::Slides::Presentation::get_Section ( int32_t  index)
overridevirtual

Returns a slide section defined in the presentation at the specified index. Read-only Aspose::Slides::ISection

Implements Aspose::Slides::IPresentation.

◆ get_Sections()

System::SharedPtr< ISectionCollection > Aspose::Slides::Presentation::get_Sections ( )
overridevirtual

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

The following examples shows how to create Sections in a PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>();
auto defaultSlide = pres->get_Slides()->idx_get(0);
auto layoutSlide = pres->get_LayoutSlides()->idx_get(0);
auto newSlide1 = pres->get_Slides()->AddEmptySlide(layoutSlide);
auto newSlide2 = pres->get_Slides()->AddEmptySlide(layoutSlide);
auto newSlide3 = pres->get_Slides()->AddEmptySlide(layoutSlide);
auto newSlide4 = pres->get_Slides()->AddEmptySlide(layoutSlide);
System::SharedPtr<ISection> section1 = pres->get_Sections()->AddSection(u"Section 1", newSlide1);
// section1 will be ended at newSlide2 and after it section2 will start
System::SharedPtr<ISection> section2 = pres->get_Sections()->AddSection(u"Section 2", newSlide3);
pres->Save(u"pres-sections.pptx", SaveFormat::Pptx);
pres->get_Sections()->ReorderSectionWithSlides(section2, 0);
pres->Save(u"pres-sections-moved.pptx", SaveFormat::Pptx);
pres->get_Sections()->RemoveSectionWithSlides(section2);
pres->get_Sections()->AppendEmptySection(u"Last empty section");
pres->Save(u"pres-section-with-empty.pptx", SaveFormat::Pptx);

The following examples shows how to changing the names of Sections.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
System::SharedPtr<ISection> section = pres->get_Sections()->idx_get(0);
section->set_Name(u"My section");

Implements Aspose::Slides::IPresentation.

◆ get_Slide()

System::SharedPtr< ISlide > Aspose::Slides::Presentation::get_Slide ( int32_t  index)
overridevirtual

Returns a slide defined in the presentation at the specified index. Read-only Aspose::Slides::ISlide.

Implements Aspose::Slides::IPresentation.

◆ get_Slides()

System::SharedPtr< ISlideCollection > Aspose::Slides::Presentation::get_Slides ( )
overridevirtual

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

The following example shows how to set slides' background color of PowerPoint Presentation.

// Instantiate the Presentation class that represents the presentation file
auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);
// Set the background color of the first ISlide to Blue
slide->get_Background()->set_Type(BackgroundType::OwnBackground);
slide->get_Background()->get_FillFormat()->set_FillType(FillType::Solid);
slide->get_Background()->get_FillFormat()->get_SolidFillColor()->set_Color(System::Drawing::Color::get_Blue());
pres->Save(u"ContentBG_out.pptx", SaveFormat::Pptx);
static Color get_Blue()
Returns a color whose ARGB value in hexadecimal notation is #FF0000FF.

The following example shows how to set slides' background image of PowerPoint Presentation.

// Instantiate the Presentation class that represents the presentation file
auto pres = System::MakeObject<Presentation>(u"SetImageAsBackground.pptx");
auto slide = pres->get_Slides()->idx_get(0);
// Set the background with Image
slide->get_Background()->set_Type(BackgroundType::OwnBackground);
slide->get_Background()->get_FillFormat()->set_FillType(FillType::Picture);
slide->get_Background()->get_FillFormat()->get_PictureFillFormat()->set_PictureFillMode(Aspose::Slides::PictureFillMode::Stretch);
// Set the picture
auto img = System::ExplicitCast<System::Drawing::Image>(System::MakeObject<System::Drawing::Bitmap>(dataDir + u"Tulips.jpg"));
// Add image to presentation's images collection
auto imgx = pres->get_Images()->AddImage(img);
slide->get_Background()->get_FillFormat()->get_PictureFillFormat()->get_Picture()->set_Image(imgx);
// Write the presentation to disk
pres->Save(u"ContentBG_Img_out.pptx", SaveFormat::Pptx);
@ Picture
A single picture is used to fill the object.

The following example shows how to add slide transition Presentation.

// Instantiate Presentation class to load the source presentation file
auto presentation = System::MakeObject<Presentation>(u"AccessSlides.pptx");
// Apply circle type transition on slide 1
presentation->get_Slides()->idx_get(0)->get_SlideShowTransition()->set_Type(SlideShow::TransitionType::Circle);
// Apply comb type transition on slide 2
presentation->get_Slides()->idx_get(1)->get_SlideShowTransition()->set_Type(SlideShow::TransitionType::Comb);
// Write the presentation to disk
presentation->Save(u"SampleTransition_out.pptx", SaveFormat::Pptx);
@ Circle
Relates to transition Shape (with option Circle) in PowerPoint 2010.

The following example shows how to add advanced slide Transition.

// Instantiate Presentation class that represents a presentation file
auto pres = System::MakeObject<Presentation>(u"BetterSlideTransitions.pptx");
auto slide1 = pres->get_Slides()->idx_get(0);
auto slide2 = pres->get_Slides()->idx_get(1);
auto slide3 = pres->get_Slides()->idx_get(2);
// Apply circle type transition on slide 1
slide1->get_SlideShowTransition()->set_Type(SlideShow::TransitionType::Circle);
// Set the transition time of 3 seconds
slide1->get_SlideShowTransition()->set_AdvanceOnClick(true);
slide1->get_SlideShowTransition()->set_AdvanceAfterTime(3000);
// Apply comb type transition on slide 2
slide2->get_SlideShowTransition()->set_Type(SlideShow::TransitionType::Comb);
// Set the transition time of 5 seconds
slide2->get_SlideShowTransition()->set_AdvanceOnClick(true);
slide2->get_SlideShowTransition()->set_AdvanceAfterTime(5000);
// Apply zoom type transition on slide 3
slide3->get_SlideShowTransition()->set_Type(SlideShow::TransitionType::Zoom);
// Set the transition time of 7 seconds
slide3->get_SlideShowTransition()->set_AdvanceOnClick(true);
slide3->get_SlideShowTransition()->set_AdvanceAfterTime(7000);
// Write the presentation to disk
pres->Save(u"SampleTransition_out.pptx", SaveFormat::Pptx);
@ Zoom
Relates to transition Shape (with options In/Out) in PowerPoint 2010. See also TransitionType::Warp t...

Implements Aspose::Slides::IPresentation.

◆ get_SlideShowSettings()

System::SharedPtr< Aspose::Slides::SlideShowSettings > Aspose::Slides::Presentation::get_SlideShowSettings ( ) const

Returns the slide show settings for the presentation.

◆ get_SlideSize()

System::SharedPtr< ISlideSize > Aspose::Slides::Presentation::get_SlideSize ( )
overridevirtual

Returns slide size object. Read-only ISlideSize.

The following example shows how to change the slide size in a PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>(u"pres-4x3-aspect-ratio.pptx");
pres->Save(u"pres-4x3-aspect-ratio.pptx", SaveFormat::Pptx);

The following example shows how to set slide size with respect to content scaling for a PowerPoint Presentation.

// Instantiate a Presentation object that represents a presentation file
auto presentation = System::MakeObject<Presentation>(u"AccessSlides.pptx");
auto auxPresentation = System::MakeObject<Presentation>();
auto slide = presentation->get_Slides()->idx_get(0);
// Set the slide size of generated presentations to that of source
presentation->get_SlideSize()->SetSize(540.0f, 720.0f, SlideSizeScaleType::EnsureFit);
// Method SetSize is used for set slide size with scale content to ensure fit
presentation->get_SlideSize()->SetSize(SlideSizeType::A4Paper, SlideSizeScaleType::Maximize);
// Method SetSize is used for set slide size with maximize size of content
// Save Presentation to disk
auxPresentation->Save(u"Set_Size_Type_out.pptx", SaveFormat::Pptx);
@ EnsureFit
Scale to ensure fit.
@ Maximize
Maximize size of content.

The following example shows how to specifying custom slide sizes in a PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
pres->get_SlideSize()->SetSize(780.0f, 540.0f, SlideSizeScaleType::DoNotScale);
// A4 paper size
pres->Save(u"pres-a4-slide-size.pptx", SaveFormat::Pptx);

Implements Aspose::Slides::IPresentation.

◆ get_SourceFormat()

Aspose::Slides::SourceFormat Aspose::Slides::Presentation::get_SourceFormat ( )
overridevirtual

Returns information about from which format presentation was loaded. Read-only SourceFormat.

Implements Aspose::Slides::IPresentation.

◆ get_VbaProject()

System::SharedPtr< Vba::IVbaProject > Aspose::Slides::Presentation::get_VbaProject ( )
overridevirtual

Gets VBA project with presentation macros. Read Vba::IVbaProject.

Implements Aspose::Slides::IPresentation.

◆ get_Video()

System::SharedPtr< IVideo > Aspose::Slides::Presentation::get_Video ( int32_t  index)
overridevirtual

Return embedded video file in the presentation at the specified index. Read-only Aspose::Slides::IVideo

Implements Aspose::Slides::IPresentation.

◆ get_Videos()

System::SharedPtr< IVideoCollection > Aspose::Slides::Presentation::get_Videos ( )
overridevirtual

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

The following examples shows how to create embedded Video Frame in a PowerPoint Presentation.

// Instantiate Presentation class that represents the PPTX
auto pres = System::MakeObject<Presentation>();
// Get the first slide
auto slide = pres->get_Slides()->idx_get(0);
// Embed video inside presentation
System::SharedPtr<IVideo> video = pres->get_Videos()->AddVideo(System::MakeObject<System::IO::FileStream>(u"Wildlife.mp4", System::IO::FileMode::Open));
// Add Video Frame
auto vf = slide->get_Shapes()->AddVideoFrame(50.0f, 150.0f, 300.0f, 350.0f, video);
// Set video to Video Frame
vf->set_EmbeddedVideo(video);
// Set Play Mode and Volume of the Video
vf->set_PlayMode(VideoPlayModePreset::Auto);
vf->set_Volume(AudioVolumeMode::Loud);
// Write the PPTX file to disk
pres->Save(u"VideoFrame_out.pptx", SaveFormat::Pptx);

The following examples shows how to add a video passing path to the video file directly into AddVideoFrame method for PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);
auto vf = slide->get_Shapes()->AddVideoFrame(50.0f, 150.0f, 300.0f, 150.0f, u"video1.avi");

The following examples shows how to add large file through BLOB to a Presentation.

const System::String pathToVeryLargeVideo = u"veryLargeVideo.avi";
// Creates a new presentation to which the video will be added
auto pres = System::MakeObject<Presentation>();
auto fileStream = System::MakeObject<System::IO::FileStream>(pathToVeryLargeVideo, System::IO::FileMode::Open);
// Let's add the video to the presentation - we chose the KeepLocked behavior because we do
// not intend to access the "veryLargeVideo.avi" file.
System::SharedPtr<IVideo> video = pres->get_Videos()->AddVideo(fileStream, LoadingStreamBehavior::KeepLocked);
pres->get_Slides()->idx_get(0)->get_Shapes()->AddVideoFrame(0.0f, 0.0f, 480.0f, 270.0f, video);
// Saves the presentation. While a large presentation gets outputted, the memory consumption
// stays low through the pres object's lifecycle
pres->Save(u"presentationWithLargeVideo.pptx", Export::SaveFormat::Pptx);
@ Pptx
Save presentation in PPTX format.

The following examples shows how to export large file through BLOB from PowerPoint Presentation.

const System::String hugePresentationWithAudiosAndVideosFile = u"Large Video File Test1.pptx";
auto loadOptions = System::MakeObject<LoadOptions>();
loadOptions->set_BlobManagementOptions(System::MakeObject<BlobManagementOptions>());
loadOptions->get_BlobManagementOptions()->set_PresentationLockingBehavior(PresentationLockingBehavior::KeepLocked);
// Creates a Presentation's instance, locks the "hugePresentationWithAudiosAndVideos.pptx" file.
auto pres = System::MakeObject<Presentation>(hugePresentationWithAudiosAndVideosFile, loadOptions);
// Let's save each video to a file. To prevent high memory usage, we need a buffer that will be used
// to transfer the data from the presentation's video stream to a stream for a newly created video file.
System::ArrayPtr<uint8_t> buffer = System::MakeArray<uint8_t>(8 * 1024, 0);
// Iterates through the videos
for (int32_t index = 0; index < pres->get_Videos()->get_Count(); index++)
{
System::SharedPtr<IVideo> video = pres->get_Videos()->idx_get(index);
// Opens the presentation video stream. Please, note that we intentionally avoided accessing properties
// like video.BinaryData - because this property returns a byte array containing a full video, which then
// causes bytes to be loaded into memory. We use video.GetStream, which will return Stream - and does NOT
// require us to load the whole video into the memory.
auto presVideoStream = video->GetStream();
auto outputFileStream = System::IO::File::OpenWrite(System::String::Format(u"video{0}.avi", index));
int32_t bytesRead;
while ((bytesRead = presVideoStream->Read(buffer, 0, buffer->get_Length())) > 0)
{
outputFileStream->Write(buffer, 0, bytesRead);
}
// Memory consumption will remain low regardless of the size of the video or presentation,
}
// If necessary, you can apply the same steps for audio files.
static FileStreamPtr OpenWrite(const String &path)
Opens the specified file for writing only, in 'OpenOrCreate' mode with no sharing.
static String Format(const SharedPtr< IFormatProvider > &fp, const String &format, const Args &... args)
Formats string in C# style.
Definition: string.h:1376
@ KeepLocked
The source will be locked for a whole lifetime of IPresentation instance, until it will be disposed.

The following examples shows how to add a hyperlink to a video in a PowerPoint Presentation.

auto pres = System::MakeObject<Presentation>();
System::SharedPtr<IVideo> video = pres->get_Videos()->AddVideo(System::IO::File::ReadAllBytes(u"video.avi"));
System::SharedPtr<IVideoFrame> videoFrame = pres->get_Slides()->idx_get(0)->get_Shapes()->AddVideoFrame(10.0f, 10.0f, 100.0f, 100.0f, video);
videoFrame->set_HyperlinkClick(System::MakeObject<Hyperlink>(u"https://www.aspose.com/"));
videoFrame->get_HyperlinkClick()->set_Tooltip(u"More than 70% Fortune 100 companies trust Aspose APIs");
pres->Save(u"pres-out.pptx", SaveFormat::Pptx);

The following examples shows how to create Video Frame with Video from Web Source in a PowerPoint Presentation.

void Run()
{
auto pres = System::MakeObject<Presentation>();
AddVideoFromYouTube(pres, u"Tj75Arhq5ho");
pres->Save(u"AddVideoFrameFromWebSource_out.pptx", SaveFormat::Pptx);
}
void AddVideoFromYouTube(System::SharedPtr<Presentation> pres, System::String videoId)
{
// Add videoFrame
auto slide = pres->get_Slides()->idx_get(0);
System::SharedPtr<IVideoFrame> videoFrame = slide->get_Shapes()->AddVideoFrame(10.0f, 10.0f, 427.0f, 240.0f, System::String(u"https://www.youtube.com/embed/") + videoId);
videoFrame->set_PlayMode(Aspose::Slides::VideoPlayModePreset::Auto);
// Load thumbnail
auto client = System::MakeObject<System::Net::WebClient>();
System::String thumbnailUri = System::String(u"http://img.youtube.com/vi/") + videoId + u"/hqdefault.jpg";
videoFrame->get_PictureFormat()->get_Picture()->set_Image(pres->get_Images()->AddImage(client->DownloadData(thumbnailUri)));
}

The following examples shows how to extract Video from slide of PowerPoint Presentation.

// Instantiate a Presentation object that represents a presentation file
auto presentation = System::MakeObject<Presentation>(u"Video.pptx");
for (auto&& slide : presentation->get_Slides())
{
for (auto&& shape : slide->get_Shapes())
{
if (System::ObjectExt::Is<VideoFrame>(shape))
{
System::SharedPtr<IVideoFrame> vf = System::AsCast<Aspose::Slides::IVideoFrame>(shape);
System::String type = vf->get_EmbeddedVideo()->get_ContentType();
int32_t ss = type.LastIndexOf(u'/');
type = type.Remove(0, type.LastIndexOf(u'/') + 1);
System::ArrayPtr<uint8_t> buffer = vf->get_EmbeddedVideo()->get_BinaryData();
auto stream = System::MakeObject<System::IO::FileStream>(System::String(u"NewVideo_out.") + type,
stream->Write(buffer, 0, buffer->get_Length());
}
}
}
String Remove(int32_t startIndex, int32_t count=INT32_MAX) const
Extracts everything but substring from current string.
int LastIndexOf(const String &str, int startIndex=INT32_MAX) const
Substring backward lookup.
@ Write
Write-only access.
@ Read
Read-only access.
@ Create
Create a new file. If the file already exists, it is overwritten.

Implements Aspose::Slides::IPresentation.

◆ get_ViewProperties()

System::SharedPtr< IViewProperties > Aspose::Slides::Presentation::get_ViewProperties ( )
overridevirtual

Gets presentation wide view properties. Read-only IViewProperties.

Implements Aspose::Slides::IPresentation.

◆ GetSlideById()

System::SharedPtr< IBaseSlide > Aspose::Slides::Presentation::GetSlideById ( uint32_t  id)
overridevirtual

Returns a Slide, MasterSlide or LayoutSlide by Id.

Parameters
idId of a slide.
Returns
IBaseSlide object.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [1/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::INotesCommentsLayoutingOptions notesCommentsLayouting)
overridevirtual

Returns a Thumbnail Bitmap objects for all slides of a presentation.

Deprecated:
Use Presentation.GetThumbnails(IRenderingOptions) instead. The method will be removed after release of version 21.4.
Parameters
notesCommentsLayoutingOptions for notes and comments layouting.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [2/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::INotesCommentsLayoutingOptions notesCommentsLayouting,
float  scaleX,
float  scaleY 
)
overridevirtual

Returns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling.

Deprecated:
Use Presentation.GetThumbnails(IRenderingOptions, float, float) instead. The method will be removed after release of version 21.4.
Parameters
notesCommentsLayoutingOptions for notes and comments layouting.
scaleXThe value by which to scale this Thumbnail in the x-axis direction.
scaleYThe value by which to scale this Thumbnail in the y-axis direction.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [3/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::INotesCommentsLayoutingOptions notesCommentsLayouting,
System::ArrayPtr< int32_t slides 
)
overridevirtual

Returns a Thumbnail Bitmap objects for specified slides of a presentation.

Deprecated:
Use Presentation.GetThumbnails(IRenderingOptions, int[]) instead. The method will be removed after release of version 21.4.
Parameters
notesCommentsLayoutingOptions for notes and comments layouting.
slidesArray with slide positions, starting from 1.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [4/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::INotesCommentsLayoutingOptions notesCommentsLayouting,
System::ArrayPtr< int32_t slides,
float  scaleX,
float  scaleY 
)
overridevirtual

Returns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling.

Deprecated:
Use Presentation.GetThumbnails(IRenderingOptions, int[], float, float) instead. The method will be removed after release of version 21.4.
Parameters
notesCommentsLayoutingOptions for notes and comments layouting.
slidesArray with slide positions, starting from 1.
scaleXThe value by which to scale this Thumbnail in the x-axis direction.
scaleYThe value by which to scale this Thumbnail in the y-axis direction.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [5/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::INotesCommentsLayoutingOptions notesCommentsLayouting,
System::ArrayPtr< int32_t slides,
System::Drawing::Size  imageSize 
)
overridevirtual

Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size.

Deprecated:
Use Presentation.GetThumbnails(IRenderingOptions, int[], Size) instead. The method will be removed after release of version 21.4.
Parameters
notesCommentsLayoutingOptions for notes and comments layouting.
slidesArray with slide positions, starting from 1.
imageSizeSize of the image to create.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [6/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::INotesCommentsLayoutingOptions notesCommentsLayouting,
System::Drawing::Size  imageSize 
)
overridevirtual

Returns a Thumbnail Bitmap objects for all slides of a presentation with specified size.

Deprecated:
Use Presentation.GetThumbnails(IRenderingOptions, Size) instead. The method will be removed after release of version 21.4.
Parameters
notesCommentsLayoutingOptions for notes and comments layouting.
imageSizeSize of the image to create.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [7/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::IRenderingOptions options)
overridevirtual

Returns a Thumbnail Bitmap objects for all slides of a presentation.

Parameters
optionsTiff options.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [8/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::IRenderingOptions options,
float  scaleX,
float  scaleY 
)
overridevirtual

Returns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling.

Parameters
optionsTiff options.
scaleXThe value by which to scale this Thumbnail in the x-axis direction.
scaleYThe value by which to scale this Thumbnail in the y-axis direction.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [9/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::IRenderingOptions options,
System::ArrayPtr< int32_t slides 
)
overridevirtual

Returns a Thumbnail Bitmap objects for specified slides of a presentation.

Parameters
optionsTiff options.
slidesArray with slide positions, starting from 1.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [10/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::IRenderingOptions options,
System::ArrayPtr< int32_t slides,
float  scaleX,
float  scaleY 
)
overridevirtual

Returns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling.

Parameters
optionsTiff options.
slidesArray with slide positions, starting from 1.
scaleXThe value by which to scale this Thumbnail in the x-axis direction.
scaleYThe value by which to scale this Thumbnail in the y-axis direction.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [11/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::IRenderingOptions options,
System::ArrayPtr< int32_t slides,
System::Drawing::Size  imageSize 
)
overridevirtual

Returns a Thumbnail Bitmap objects for specified slides of a presentation with specified size.

Parameters
optionsTiff options.
slidesArray with slide positions, starting from 1.
imageSizeSize of the image to create.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ GetThumbnails() [12/12]

System::ArrayPtr< System::SharedPtr< System::Drawing::Bitmap > > Aspose::Slides::Presentation::GetThumbnails ( System::SharedPtr< Export::IRenderingOptions options,
System::Drawing::Size  imageSize 
)
overridevirtual

Returns a Thumbnail Bitmap objects for all slides of a presentation with specified size.

Parameters
optionsTiff options.
imageSizeSize of the image to create.
Returns
Bitmap objects.

Implements Aspose::Slides::IPresentation.

◆ JoinPortionsWithSameFormatting()

void Aspose::Slides::Presentation::JoinPortionsWithSameFormatting ( )
overridevirtual

Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides.

Implements Aspose::Slides::IPresentation.

◆ Save() [1/11]

void Aspose::Slides::Presentation::Save ( System::SharedPtr< Export::Xaml::IXamlOptions options)
overridevirtual

Saves all slides of a presentation to a set of files representing XAML markup.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
SharedPtr<IXamlOptions> options = System::MakeObject<XamlOptions>();
options->set_ExportHiddenSlides(true);
pres->Save(options);


Parameters
optionsThe XAML format options.

Implements Aspose::Slides::IPresentation.

◆ Save() [2/11]

void Aspose::Slides::Presentation::Save ( System::SharedPtr< System::IO::Stream stream,
Export::SaveFormat  format 
)
overridevirtual

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

Parameters
streamOutput stream.
formatFormat of the exported data.

Implements Aspose::Slides::IPresentation.

◆ Save() [3/11]

void Aspose::Slides::Presentation::Save ( System::SharedPtr< System::IO::Stream stream,
Export::SaveFormat  format,
System::SharedPtr< Export::ISaveOptions options 
)
overridevirtual

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

Parameters
streamOutput stream.
formatFormat of the exported data.
optionsAdditional format options.
Exceptions
System::NotSupportedExceptionIf you try to save encrypted file in none Office 2007-2010 format

Implements Aspose::Slides::IPresentation.

◆ Save() [4/11]

void Aspose::Slides::Presentation::Save ( System::SharedPtr< System::IO::Stream stream,
System::ArrayPtr< int32_t slides,
Export::SaveFormat  format 
)
overridevirtual

Saves specified slides of a presentation to a stream in the specified format with page number keeping.

Parameters
streamOutput stream.
slidesArray with slide positions, starting from 1.
formatFormat of the exported data.

Implements Aspose::Slides::IPresentation.

◆ Save() [5/11]

void Aspose::Slides::Presentation::Save ( System::SharedPtr< System::IO::Stream stream,
System::ArrayPtr< int32_t slides,
Export::SaveFormat  format,
System::SharedPtr< Export::ISaveOptions options 
)
overridevirtual

Saves specified slides of a presentation to a stream in the specified format with page number keeping.

Parameters
streamOutput stream.
slidesArray with slide positions, starting from 1.
formatFormat of the exported data.
optionsAdditional format options.
Exceptions
System::ArgumentNullExceptionWhen stream or slides parameter is null.
System::ArgumentOutOfRangeExceptionWhen slides parameter contains wrong page numbers.
System::InvalidOperationExceptionWhen an unsupported SaveFormat is used, e.g. PPTX, PPTM, PPSX, PPSM, POTX, POTM, PPT, ODP.

The following example shows how to convert PowerPoint to PNG.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
for (int32_t index = 0; index < pres->get_Slides()->get_Count(); index++)
{
auto slide = pres->get_Slides()->idx_get(index);
slide->GetThumbnail()->Save(System::String::Format(u"slide_{0}.png", index),
}
static ImageFormatPtr get_Png()
Returns a shared pointer to an ImageFormat object that represents the W3C Portable Network Graphics (...
Definition: image_format.h:48

The following example shows how to convert PowerPoint to PNG with custom dimensions.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
float scaleX = 2.0f, scaleY = 2.0f;
for (int32_t index = 0; index < pres->get_Slides()->get_Count(); index++)
{
auto slide = pres->get_Slides()->idx_get(index);
slide->GetThumbnail(scaleX, scaleY)->Save(System::String::Format(u"slide_{0}.png", index),
}

The following example shows how to convert PowerPoint to PNG with custom size.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
System::Drawing::Size size(960, 720);
for (int32_t index = 0; index < pres->get_Slides()->get_Count(); index++)
{
auto slide = pres->get_Slides()->idx_get(index);
slide->GetThumbnail(size)->Save(System::String::Format(u"slide_{0}.png", index),
}
Represents a pair of integer values that represent width and height of an image. This type should be ...
Definition: size.h:14

Implements Aspose::Slides::IPresentation.

◆ Save() [6/11]

void Aspose::Slides::Presentation::Save ( System::String  fname,
Export::SaveFormat  format 
)
overridevirtual

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

Parameters
fnamePath to the created file.
formatFormat of the exported data.

Implements Aspose::Slides::IPresentation.

◆ Save() [7/11]

void Aspose::Slides::Presentation::Save ( System::String  fname,
Export::SaveFormat  format,
System::SharedPtr< Export::ISaveOptions options 
)
overridevirtual

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

Parameters
fnamePath to the created file.
formatFormat of the exported data.
optionsAdditional format options.

The following example shows how to convert PowerPoint to HTML using C++.

// Instantiates a presentation object that represents a presentation file e.g. PPT, PPTX, ODP etc.
auto presentation = System::MakeObject<Presentation>(u"Convert_HTML.pptx");
System::SharedPtr<HtmlOptions> htmlOpt = System::MakeObject<HtmlOptions>();
System::SharedPtr<INotesCommentsLayoutingOptions> options = htmlOpt->get_NotesCommentsLayouting();
options->set_NotesPosition(NotesPositions::BottomFull);
htmlOpt->set_HtmlFormatter(HtmlFormatter::CreateDocumentFormatter(u"", false));
// Saves the presentation to HTML
presentation->Save(u"ConvertWholePresentationToHTML_out.html", SaveFormat::Html, htmlOpt);

The following example shows how to convert PowerPoint to responsive HTML using C++.

// Instantiates a Presentation object that represents a presentation file
auto presentation = System::MakeObject<Presentation>(u"Convert_HTML.pptx");
System::SharedPtr<ResponsiveHtmlController> controller = System::MakeObject<ResponsiveHtmlController>();
System::SharedPtr<HtmlOptions> htmlOptions = System::MakeObject<HtmlOptions>();
htmlOptions->set_HtmlFormatter(HtmlFormatter::CreateCustomFormatter(controller));
// Saves the presentation to HTML
presentation->Save(u"ConvertPresentationToResponsiveHTML_out.html", SaveFormat::Html, htmlOptions);

The following example shows how to convert PowerPoint to HTML with notes using C++.

auto pres = System::MakeObject<Presentation>(u"Presentation.pptx");
auto opt = System::MakeObject<HtmlOptions>();
System::SharedPtr<INotesCommentsLayoutingOptions> options = opt->get_NotesCommentsLayouting();
options->set_NotesPosition(NotesPositions::BottomFull);
// Saves notes pages
pres->Save(u"Output.html", SaveFormat::Html, opt);

The following example shows how to convert PowerPoint to HTML with original fonts using C++.

auto pres = System::MakeObject<Presentation>(u"input.pptx");
// Excludes default presentation fonts
System::ArrayPtr<System::String> fontNameExcludeList = System::MakeArray<System::String>({u"Calibri", u"Arial"});
auto embedFontsController = System::MakeObject<EmbedAllFontsHtmlController>(fontNameExcludeList);
auto htmlOptionsEmbed = System::MakeObject<HtmlOptions>();
htmlOptionsEmbed->set_HtmlFormatter(HtmlFormatter::CreateCustomFormatter(embedFontsController));
pres->Save(u"input-PFDinDisplayPro-Regular-installed.html", SaveFormat::Html, htmlOptionsEmbed);

The following example shows how to convert PowerPoint to HTML with high-quality images at 150 DPI using C++.

auto pres = System::MakeObject<Presentation>(u"InputDoc.pptx");
auto htmlOpts = System::MakeObject<HtmlOptions>();
htmlOpts->set_PicturesCompression(PicturesCompression::Dpi150);
pres->Save(u"OutputDoc-dpi150.html", SaveFormat::Html, htmlOpts);

The following example shows how to convert PowerPoint to HTML with full quality images using C++.

auto pres = System::MakeObject<Presentation>(u"InputDoc.pptx");
auto htmlOpts = System::MakeObject<HtmlOptions>();
htmlOpts->set_DeletePicturesCroppedAreas(false);
pres->Save(u"Outputdoc-noCrop.html", SaveFormat::Html, htmlOpts);

The following example shows how to convert Slide to HTML using C++.

The following example shows how to save CSS and Images when exporting To HTML using C++.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
auto htmlController = System::MakeObject<CustomHeaderAndFontsController>(u"styles.css");
auto options = System::MakeObject<HtmlOptions>();
options->set_HtmlFormatter(HtmlFormatter::CreateCustomFormatter(htmlController));
pres->Save(u"pres.html", SaveFormat::Html, options);
class CustomHeaderAndFontsController : public EmbedAllFontsHtmlController
{
public:
CustomHeaderAndFontsController(System::String cssFileName);
void WriteDocumentStart(System::SharedPtr<IHtmlGenerator> generator, System::SharedPtr<IPresentation> presentation) override;
void WriteAllFonts(System::SharedPtr<IHtmlGenerator> generator, System::SharedPtr<IPresentation> presentation) override;
private:
static const System::String ms_header;
System::String m_cssFileName;
};
const System::String CustomHeaderAndFontsController::ms_header = System::String(u"<!DOCTYPE html>\n") +
u"<html>\n" + u"<head>\n" +
u"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" +
u"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\">\n" +
u"<link rel=\"stylesheet\" type=\"text/css\" href=\"{0}\">\n" +
u"</head>";
CustomHeaderAndFontsController::CustomHeaderAndFontsController(System::String cssFileName) : m_cssFileName(cssFileName)
{}
void CustomHeaderAndFontsController::WriteDocumentStart(System::SharedPtr<IHtmlGenerator> generator, System::SharedPtr<IPresentation> presentation)
{
generator->AddHtml(System::String::Format(ms_header, m_cssFileName));
WriteAllFonts(generator, presentation);
}
void CustomHeaderAndFontsController::WriteAllFonts(System::SharedPtr<IHtmlGenerator> generator, System::SharedPtr<IPresentation> presentation)
{
generator->AddHtml(u"<!-- Embedded fonts -->");
EmbedAllFontsHtmlController::WriteAllFonts(generator, presentation);
}

The following example shows how to link all fonts when converting Presentation to HTML using C++.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
// Excludes default presentation fonts
System::ArrayPtr<System::String> fontNameExcludeList = System::MakeArray<System::String>({u"Calibri", u"Arial"});
auto linkcont = System::MakeObject<LinkAllFontsHtmlController>(fontNameExcludeList, u"C:\\Windows\\Fonts\\");
auto htmlOptionsEmbed = System::MakeObject<HtmlOptions>();
htmlOptionsEmbed->set_HtmlFormatter(HtmlFormatter::CreateCustomFormatter(linkcont));
pres->Save(u"pres.html", SaveFormat::Html, htmlOptionsEmbed);

The following example shows how to LinkAllFontsHtmlController is implemented using C++.

class LinkAllFontsHtmlController : public EmbedAllFontsHtmlController
{
public:
LinkAllFontsHtmlController(System::ArrayPtr<System::String> fontNameExcludeList, System::String basePath);
void WriteFont(System::SharedPtr<IHtmlGenerator> generator,
System::String fontStyle,
System::String fontWeight,
System::ArrayPtr<uint8_t> fontData) override;
private:
System::String m_basePath;
};
LinkAllFontsHtmlController::LinkAllFontsHtmlController(System::ArrayPtr<System::String> fontNameExcludeList, System::String basePath)
: EmbedAllFontsHtmlController(fontNameExcludeList), m_basePath(basePath)
{}
void RegressionTests_v14_1::LinkAllFontsHtmlController::WriteFont(System::SharedPtr<IHtmlGenerator> generator,
System::String fontStyle,
System::String fontWeight,
{
try
{
System::String fontName = substitutedFont == nullptr ? originalFont->get_FontName() : substitutedFont->get_FontName();
System::String path = fontName + u".woff";
// Some path sanitize may be needed
generator->AddHtml(u"<style>");
generator->AddHtml(u"@font-face { ");
generator->AddHtml(System::String(u"font-family: '") + fontName + u"'; ");
generator->AddHtml(System::String(u"src: url('") + path + u"')");
generator->AddHtml(u" }");
generator->AddHtml(u"</style>");
}
catch (System::Exception& ex)
{
}
}
virtual String get_Message() const
Returns the string containing the error destcription.
Template class specialization for Exception class.
Definition: exception.h:208
static void WriteAllBytes(const String &path, const ArrayPtr< uint8_t > &bytes)
Overwrites the specified binary file and writes the specified bytes to it.
static String Combine(const ArrayPtr< String > &paths)
Combines the specified path segments into a single path inserting directory separator characters betw...

The following example shows how to convert PowerPoint to responsive HTML using C++.

auto presentation = System::MakeObject<Presentation>(u"SomePresentation.pptx");
auto saveOptions = System::MakeObject<HtmlOptions>();
saveOptions->set_SvgResponsiveLayout(true);
presentation->Save(u"SomePresentation-out.html", SaveFormat::Html, saveOptions);

The following example shows how to export Media files to HTML using C++.

// Loads a presentation
auto pres = System::MakeObject<Presentation>();
System::String path = u"C:/out/";
const System::String fileName = u"ExportMediaFiles_out.html";
const System::String baseUri = u"http://www.example.com/";
auto fileStream = System::MakeObject<System::IO::FileStream>(u"my_video.avi", System::IO::FileMode::Open, System::IO::FileAccess::Read);
auto video = pres->get_Videos()->AddVideo(fileStream, LoadingStreamBehavior::ReadStreamAndRelease);
auto slide = pres->get_Slides()->idx_get(0);
slide->get_Shapes()->AddVideoFrame(10.0f, 10.0f, 100.0f, 100.0f, video);
auto controller = System::MakeObject<VideoPlayerHtmlController>(path, fileName, baseUri);
// Sets HTML options
System::SharedPtr<HtmlOptions> htmlOptions = System::MakeObject<HtmlOptions>(controller);
System::SharedPtr<SVGOptions> svgOptions = System::MakeObject<SVGOptions>(controller);
htmlOptions->set_HtmlFormatter(HtmlFormatter::CreateCustomFormatter(controller));
htmlOptions->set_SlideImageFormat(SlideImageFormat::Svg(svgOptions));
// Saves the file
pres->Save(System::IO::Path::Combine(path, fileName), SaveFormat::Html, htmlOptions);
@ ReadStreamAndRelease
The stream will be read to the end and then released - i.e. it will be guaranteed that this stream wi...
@ Read
Read-only access.

Implements Aspose::Slides::IPresentation.

◆ Save() [8/11]

void Aspose::Slides::Presentation::Save ( System::String  fname,
Export::SaveFormat  format,
System::SharedPtr< Export::ISaveOptions options,
System::SharedPtr< System::Web::HttpResponse response,
bool  showInline 
)
overridevirtual

Sends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide.

Parameters
fnameThe name for the presentation that will appear at the client browser. The name should not contain path.
formatFormat of the exported data.
optionsAdditional format options.
responseResponse object where to save the document.
showInlineTrue to show an option to open the presentation inside the browser.

Implements Aspose::Slides::IPresentation.

◆ Save() [9/11]

void Aspose::Slides::Presentation::Save ( System::String  fname,
Export::SaveFormat  format,
System::SharedPtr< System::Web::HttpResponse response,
bool  showInline 
)
overridevirtual

Sends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide.

Parameters
fnameThe name for the presentation that will appear at the client browser. The name should not contain path.
formatFormat of the exported data.
responseResponse object where to save the document.
showInlineTrue to show an option to open the presentation inside the browser.

Implements Aspose::Slides::IPresentation.

◆ Save() [10/11]

void Aspose::Slides::Presentation::Save ( System::String  fname,
System::ArrayPtr< int32_t slides,
Export::SaveFormat  format 
)
overridevirtual

Saves specified slides of a presentation to a file with the specified format with page number keeping.

Parameters
fnamePath to the created file.
slidesArray with slide positions, starting from 1.
formatFormat of the exported data.
Exceptions
System::ArgumentNullExceptionWhen stream or slides parameter is null.
System::ArgumentOutOfRangeExceptionWhen slides parameter contains wrong page numbers.
System::InvalidOperationExceptionWhen an unsupported SaveFormat is used, e.g. PPTX, PPTM, PPSX, PPSM, POTX, POTM, PPT, ODP.

Implements Aspose::Slides::IPresentation.

◆ Save() [11/11]

void Aspose::Slides::Presentation::Save ( System::String  fname,
System::ArrayPtr< int32_t slides,
Export::SaveFormat  format,
System::SharedPtr< Export::ISaveOptions options 
)
overridevirtual

Saves specified slides of a presentation to a file with the specified format with page number keeping.

Parameters
fnamePath to the created file.
slidesArray with slide positions, starting from 1.
formatFormat of the exported data.
optionsAdditional format options.

Implements Aspose::Slides::IPresentation.

◆ set_CurrentDateTime()

void Aspose::Slides::Presentation::set_CurrentDateTime ( System::DateTime  value)
overridevirtual

Sets date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Write System::DateTime.

Implements Aspose::Slides::IPresentation.

◆ set_FirstSlideNumber()

void Aspose::Slides::Presentation::set_FirstSlideNumber ( int32_t  value)
overridevirtual

Represents the first slide number in the presentation

Implements Aspose::Slides::IPresentation.

◆ set_VbaProject()

void Aspose::Slides::Presentation::set_VbaProject ( System::SharedPtr< Vba::IVbaProject value)
overridevirtual

Sets VBA project with presentation macros. Write Vba::IVbaProject.

Implements Aspose::Slides::IPresentation.