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.

This class provides 16 methods for working with PresentationPart objects in .NET programs. Available methods include: AddMasterReference, AddSlideReference, GetFirstSlideNumber, GetNextMasterId, GetNextSlideId, GetNotesSize, GetSlideRefById, GetSlideRefByRelId, GetSlideSize, Load, ParseMasters, ParseSlides, and 4 additional methods. All exported members are accessible to any .NET application after installing the Aspose.Slides FOSS for .NET package. Properties: ElementTree, MasterReferences, PartName, SlideCount, SlideReferences.

Description

PresentationPart is a class in the Aspose.Slides FOSS library for .NET that exposes 16 methods and 5 properties for programmatic use.

The class also provides the MasterReferences property (gets the master references), the ElementTree property (gets the element tree), the SlideReferences property (gets the slide references).

Properties

NameTypeAccessDescription
MasterReferencesList<MasterReference>ReadGets the master references.
ElementTreeXElement?ReadGets the element tree.
SlideReferencesList<SlideReference>ReadGets the slide references.
SlideCountintReadGets the slide count.
PartNamestringReadGets the part name.

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