ApiSlide

class ApiSlide

Description

Class representing a slide.

Instance Methods

GetClassType(): slide

Returns the type of the ApiSlide class.

RemoveAllObjects()

Removes all the objects from the current slide.

AddObject(oDrawing): boolean

Adds an object (image, shape or chart) to the current presentation slide.

RemoveObject(nPos, nCount): boolean

Removes objects (image, shape or chart) from the current slide.

SetBackground(oApiFill): boolean

Sets the background to the current presentation slide.

GetVisible(): boolean

Returns the visibility of the current presentation slide.

SetVisible(value): boolean

Sets the visibility to the current presentation slide.

GetWidth(): EMU

Returns the slide width in English measure units.

GetHeight(): EMU

Returns the slide height in English measure units.

ApplyLayout(oLayout): boolean

Applies the specified layout to the current slide.

Delete(): boolean

Deletes the current slide from the presentation.

Copy(): ApiSlide | "null"

Creates a copy of the current slide object.

Duplicate(nPos): ApiSlide | "null"

Creates a duplicate of the specified slide object, adds the new slide to the slides collection.

MoveTo(nPos): boolean

Moves the current slide to a specific location within the same collection.

GetSlideIndex(): number

Returns a position of the current slide in the presentation.

ClearBackground(): boolean

Clears the slide background.

FollowLayoutBackground(): boolean

Sets the layout background as the background of the slide.

FollowMasterBackground(): boolean

Sets the master background as the background of the slide.

ApplyTheme(oApiTheme): boolean

Applies the specified theme to the current slide.

GetLayout(): ApiLayout | "null"

Returns a layout of the current slide.

GetTheme(): ApiTheme

Returns a theme of the current slide.

GetAllDrawings(): Drawing[]

Returns an array with all the drawing objects from the slide.

GetAllShapes(): ApiShape[]

Returns an array with all the shape objects from the slide.

GetAllImages(): ApiImage[]

Returns an array with all the image objects from the slide.

GetAllCharts(): ApiChart[]

Returns an array with all the chart objects from the slide.

GetAllOleObjects(): ApiOleObject[]

Returns an array with all the OLE objects from the slide.

ToJSON(bWriteLayout, bWriteMaster, bWriteAllMasLayouts, bWriteTableStyles): JSON

Converts the ApiSlide object into the JSON object.

GetDrawingsByPlaceholderType(sType): Drawing[]

Gets drawings by placeholder type.

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).