ApiPresentation

class ApiPresentation

Description

Class representing a presentation.

Instance Methods

GetClassType(): presentation

Returns a type of the ApiPresentation class.

GetCurSlideIndex(): number

Returns the index for the current slide.

GetSlideByIndex(nIndex): ApiSlide

Returns a slide by its position in the presentation.

GetCurrentSlide(): ApiSlide

Returns the current slide.

AddSlide(oSlide)

Appends a new slide to the end of the presentation.

SetSizes(nWidth, nHeight)

Sets the size to the current presentation.

CreateNewHistoryPoint()

Creates a new history point.

ReplaceCurrentImage(sImageUrl, Width, Height)

Replaces the current image with an image specified.

SetLanguage(sLangId): boolean

Specifies the languages which will be used to check spelling and grammar (if requested).

GetSlidesCount(): number

Returns a number of slides.

GetMastersCount(): number

Returns a number of slide masters.

GetMaster(nPos): ApiMaster | "null"

Returns a slide master by its position in the presentation.

AddMaster(nPos, oApiMaster): boolean

Adds the slide master to the presentation slide masters collection.

ApplyTheme(oApiTheme): boolean

Applies a theme to all the slides in the presentation.

RemoveSlides(nStart, nCount): boolean

Removes a range of slides from the presentation.

GetWidth(): EMU

Returns the presentation width in English measure units.

GetHeight(): EMU

Returns the presentation height in English measure units.

ToJSON(bWriteTableStyles): JSON

Converts the ApiPresentation object into the JSON object.

SlidesToJSON(nStart, nStart, bWriteLayout, bWriteMaster, bWriteAllMasLayouts, bWriteTableStyles): JSON[]

Converts the slides from the current ApiPresentation object into the JSON objects.

GetAllComments(): ApiComment[]

Returns all comments from the current presentation.

GetDocumentInfo(): object

Returns the document information: Application - the application the document has been created with.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).