Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / PresSlide

Interface: PresSlide

Defined in: core-interfaces.ts:2931

Extended by

Properties

addConnector

addConnector: (options) => PresSlide

Defined in: core-interfaces.ts:2934

Parameters

options

ConnectorProps

Returns

PresSlide


addImage

addImage: (options) => PresSlide

Defined in: core-interfaces.ts:2935

Parameters

options

ImageProps

Returns

PresSlide


addMedia

addMedia: (options) => PresSlide

Defined in: core-interfaces.ts:2936

Parameters

options

MediaProps

Returns

PresSlide


addNotes

addNotes: (notes) => PresSlide

Defined in: core-interfaces.ts:2937

Parameters

notes

string | NotesProps | NotesProps[]

Returns

PresSlide


addShape

addShape: (shapeName, options?) => PresSlide

Defined in: core-interfaces.ts:2938

Parameters

shapeName

SHAPE_NAME

options?

ShapeProps

Returns

PresSlide


addTable

addTable: (tableRows, options?) => PresSlide

Defined in: core-interfaces.ts:2939

Parameters

tableRows

TableRow[]

options?

TableProps

Returns

PresSlide


addText

addText: (text, options?) => PresSlide

Defined in: core-interfaces.ts:2940

Parameters

text

string | number | TextProps[]

options?

TextPropsOptions

Returns

PresSlide


background?

optional background?: BackgroundProps

Defined in: core-interfaces.ts:2964

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/gitbrent/images/myimg.png` } - retrieve image via local path
	 * @example { data: 'image/png;base64,iVtDaDrF[...]=' } - base64 string
	 * @since v3.3.0

bkgd?

optional bkgd?: string | BackgroundProps

Defined in: core-interfaces.ts:2968

Deprecated

v3.3.0 - use background


color?

optional color?: string

Defined in: core-interfaces.ts:2974

Default text color (hex format)

Example

ts
'FF3399'

Default

ts
'000000' (DEF_FONT_COLOR)

height?

readonly optional height?: number

Defined in: core-interfaces.ts:2953

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


hidden?

optional hidden?: boolean

Defined in: core-interfaces.ts:2979

Whether slide is hidden

Default

ts
false

newAutoPagedSlides?

readonly optional newAutoPagedSlides?: PresSlide[]

Defined in: core-interfaces.ts:2942


slideNumber?

optional slideNumber?: SlideNumberProps

Defined in: core-interfaces.ts:2983

Slide number options


width?

readonly optional width?: number

Defined in: core-interfaces.ts:2949

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(type, data, options?): PresSlide

Defined in: core-interfaces.ts:2932

Parameters
type

CHART_NAME

data

OptsChartData[]

options?

IChartOpts

Returns

PresSlide

Call Signature

addChart(type, options?): PresSlide

Defined in: core-interfaces.ts:2933

Parameters
type

IChartMulti[]

options?

IChartOpts

Returns

PresSlide