PresentationPart

PresentationPart

Overview

PresentationPart is a class in Aspose.Slides FOSS for .NET.

Manages the ppt/presentation.xml part of an OPC package. Provides methods to parse presentation structure, add/remove slide and master references, and get/set presentation properties such as slide size and notes size.

Properties

NameTypeAccessDescription
MasterReferencesList<MasterReference>ReadHolds a list of MasterReference objects for the presentation
ElementTreeXElement?ReadProvides access to the root XElement of the presentation XML, or null
SlideReferencesList<SlideReference>ReadHolds a list of SlideReference objects representing slides
SlideCountintReadGets the total number of slide references in the presentation
PartNamestringReadContains the part name (path) of the presentation.xml within the package

Methods

SignatureDescription
Load()Loads and parses the presentation.xml from the package.
ParseSlides()Parses slide references from the presentation XML.
ParseMasters()Parses master slide references from the presentation XML.
GetSlideRefById(slideId: int)The matching , or null if not found.
GetSlideRefByRelId(relId: string)The matching , or null if not found.
GetNextSlideId()Generates the next available slide ID. Slide IDs start at 256 by PPTX convention.
GetNextMasterId()Generates the next available master/layout slide ID. Master IDs and layout IDs share the same ID space and must all be unique.
AddMasterReference(relId: string, masterId: int?)The created .
AddSlideReference(relId: string, slideId: int?, index: int)The created .
RemoveSlideReference(slideId: int)true if removed, false if not found.
GetSlideSize()A tuple of (width, height) in EMUs.
GetNotesSize()A tuple of (width, height) in EMUs.
SetNotesSize(cx: int, cy: int)Height in EMUs.
GetFirstSlideNumber()The first slide number, defaulting to 1.
SetFirstSlideNumber(number: int)The first slide number.
Save()Saves the presentation.xml back to the package.

See Also