Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / PresSlide

Interface: PresSlide

Defined in: core-interfaces.ts:3340

Extended by

Properties

addAnimation

addAnimation: (options) => PresSlide

Defined in: core-interfaces.ts:3353

Parameters

options

AnimationProps

Returns

PresSlide


addComment

addComment: (options) => PresSlide

Defined in: core-interfaces.ts:3348

Parameters

options

CommentProps

Returns

PresSlide


addConnector

addConnector: (options) => PresSlide

Defined in: core-interfaces.ts:3345

Parameters

options

ConnectorProps

Returns

PresSlide


addImage

addImage: (options) => PresSlide

Defined in: core-interfaces.ts:3346

Parameters

options

ImageProps

Returns

PresSlide


addMedia

addMedia: (options) => PresSlide

Defined in: core-interfaces.ts:3347

Parameters

options

MediaProps

Returns

PresSlide


addNotes

addNotes: (notes) => PresSlide

Defined in: core-interfaces.ts:3349

Parameters

notes

string | NotesProps | NotesProps[]

Returns

PresSlide


addShape

addShape: (shapeName, options?) => PresSlide

Defined in: core-interfaces.ts:3350

Parameters

shapeName

SHAPE_NAME

options?

ShapeProps

Returns

PresSlide


addTable

addTable: (tableRows, options?) => PresSlide

Defined in: core-interfaces.ts:3351

Parameters

tableRows

TableRow[]

options?

TableProps

Returns

PresSlide


addText

addText: (text, options?) => PresSlide

Defined in: core-interfaces.ts:3352

Parameters

text

string | number | TextProps[]

options?

TextPropsOptions

Returns

PresSlide


background?

optional background?: BackgroundProps

Defined in: core-interfaces.ts:3382

Background color or image (color | path | data)

Examples

ts
{ color: 'FF3399' } - hex color
ts
{ color: 'FF3399', transparency:50 } - hex color with 50% transparency
ts
{ path: 'https://onedrives.com/myimg.png` } - retrieve image via URL
	 * @example { path: '/home/user/images/myimg.png` } - retrieve image via local path
	 * @example { data: 'image/png;base64,iVtDaDrF[...]=' } - base64 string

color?

optional color?: string

Defined in: core-interfaces.ts:3388

Default text color (hex format)

Example

ts
'FF3399'

Default

ts
'000000' (DEF_FONT_COLOR)

height?

readonly optional height?: number

Defined in: core-interfaces.ts:3372

Slide height in inches, resolved from the active presentation layout.


hidden?

optional hidden?: boolean

Defined in: core-interfaces.ts:3393

Whether slide is hidden

Default

ts
false

newAutoPagedSlides?

readonly optional newAutoPagedSlides?: PresSlide[]

Defined in: core-interfaces.ts:3355


slideNumber?

optional slideNumber?: SlideNumberProps

Defined in: core-interfaces.ts:3397

Slide number options


transition?

optional transition?: TransitionProps

Defined in: core-interfaces.ts:3361

Slide-show transition played when advancing to this slide (p:transition).

Example

ts
slide.transition = { type: 'fade', durationMs: 1500 }

width?

readonly optional width?: number

Defined in: core-interfaces.ts:3368

Slide width in inches, resolved from the active presentation layout. Use for coordinate math instead of hard-coding layout dimensions.

Example

ts
slide.addText('Centered', { x: 0, w: slide.width, align: 'center' })

Methods

addChart()

Call Signature

addChart(data, options): PresSlide

Defined in: core-interfaces.ts:3341

Parameters
data

OptsChartData[]

options

ChartOpts & object

Returns

PresSlide

Call Signature

addChart(charts, options?): PresSlide

Defined in: core-interfaces.ts:3342

Parameters
charts

ChartMulti[]

options?

ChartOpts

Returns

PresSlide

Call Signature

addChart(type, data, options?): PresSlide

Defined in: core-interfaces.ts:3344

Parameters
type

"area" | "line" | "pie" | "bar" | "bar3D" | "bubble" | "bubble3D" | "doughnut" | "radar" | "scatter"

data

OptsChartData[]

options?

ChartOpts

Returns

PresSlide

Deprecated

Pass type on the options object: addChart(data, { type, ...options }).