PresentationPart

General

PresentationPart és una classe en Aspose.Slides per NET.

Gestiona la part ppt/presentation.xml d’un paquet OPC. Proporciona mètodes per analitzar l’estructura de presentació, afegir / eliminar referències a diapositives i maestres, i obtenir / establir propietats de representació com ara mida de diapasó i grandària de notes.

Propietats

NameTypeAccessDescription
MasterReferencesList<MasterReference>ReadIs a list of MasterReference objects for master slide relationships
ElementTreeXElement?ReadHolds the root XElement of the presentation XML, or null if not loaded
SlideReferencesList<SlideReference>ReadIs a list of SlideReference objects representing slide relationships
SlideCountintReadReturns the total number of slide references in the presentation
PartNamestringReadIs the part name (path) of the presentation.xml within the package

Mètodes

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.
 Català