ComOfficeKitby KDAN API Reference for Windows
Table of Contents

Class Presentation

Namespace
ComOfficeKit
Assembly
ComOfficeKit.dll

A PowerPoint deck (.pptx).

public sealed class Presentation : Document, IDisposable
Inheritance
Presentation
Implements
Inherited Members

Remarks

PageCount and RenderPage(int, double) count every slide, hidden ones included; ExportPdf(string) writes the slides that are not hidden, as PowerPoint prints them.

Properties

ModelRevision

A number that moves with every change to the deck: a snapshot such as GetSlides()'s is current while it stays where it was when the snapshot was read.

public long ModelRevision { get; }

Property Value

long

Exceptions

ComOfficeKitException

As for GetSlides().

SceneEditor

The Apple SDK's value methods on this deck's slides and shapes: PresentationSceneEditor, each run by the engine as one undo step, on a slide by its index and a shape by its id.

public PresentationSceneEditor SceneEditor { get; }

Property Value

PresentationSceneEditor

SlideCount

How many slides the deck has, hidden ones included.

public int SlideCount { get; }

Property Value

int

Methods

GetDefaultLayoutChoice(int?)

The Apple SDK's SlideParser.LayoutTemplate.defaultChoice(in:after:) on this deck's layouts: the layout New Slide uses after a slide, as PowerPoint picks it: the slide's own, but after a title slide its master's Title and Content.

public int? GetDefaultLayoutChoice(int? afterSlide)

Parameters

afterSlide int?

The slide's index, from 0; null for none, as in an empty deck.

Returns

int?

An index into GetLayouts(); null when the deck has no layouts.

Exceptions

ComOfficeKitException

InvalidArgument when there is no such slide.

GetLayoutChoices(int?)

The Apple SDK's SlideParser.LayoutTemplate.choices(in:after:) on this deck's layouts: the layouts New Slide offers after a slide, as PowerPoint lists them, its master's in the master's order.

public IReadOnlyList<int> GetLayoutChoices(int? afterSlide)

Parameters

afterSlide int?

The slide's index, from 0; null for none, as in an empty deck (the first master's).

Returns

IReadOnlyList<int>

Indices into GetLayouts().

Exceptions

ComOfficeKitException

InvalidArgument when there is no such slide.

GetLayouts()

The deck's layouts, as the Apple SDK's SlideParser.layoutTemplates(pptxAt:) reads them: master by master in the file's order, each master's in its own, each with the slide New Slide makes from it. What Inserting(int, int) takes a layout's index in. Empty when the deck's layouts cannot be read, as for a deck that has never been saved.

public IReadOnlyList<SlideParserLayoutTemplate> GetLayouts()

Returns

IReadOnlyList<SlideParserLayoutTemplate>

The layouts.

Exceptions

ComOfficeKitException

As for GetSlides().

GetSlide(int)

One slide as the Apple SDK's SlideScene. A snapshot, as GetSlides()'s.

public SlideScene GetSlide(int index)

Parameters

index int

The slide's index, from 0.

Returns

SlideScene

The slide.

Exceptions

ArgumentOutOfRangeException

index is not a slide's.

ComOfficeKitException

As for GetSlides().

GetSlides()

The deck's slides as the Apple SDK's SlideScene, hidden ones included: each slide's shapes, notes and background. A snapshot: an edit does not change it. For a long deck, GetSlides(int, int) reads it in parts.

public IReadOnlyList<SlideScene> GetSlides()

Returns

IReadOnlyList<SlideScene>

The slides.

Exceptions

ComOfficeKitException

EngineMismatch when the engine beside this assembly writes another model; InvalidArgument when the deck holds a number JSON cannot carry.

GetSlides(int, int)

Part of GetSlides(): at most count slides, from the one at from. Only that part is read.

public IReadOnlyList<SlideScene> GetSlides(int from, int count)

Parameters

from int

The first slide's index, from 0. SlideCount gives an empty list.

count int

How many slides at most; fewer at the end.

Returns

IReadOnlyList<SlideScene>

The slides.

Exceptions

ComOfficeKitException

InvalidArgument when from is beyond SlideCount; otherwise as for GetSlides().