Skip to content

Interface: ImportSlideMastersOptions ​

Options for Presentation.importSlideMasters.

Properties ​

embedFonts? ​

optional embedFonts?: boolean

Carry the source deck's embedded fonts (p:embeddedFontLst in its presentation.xml) into this deck, so a slide later bound to a grafted layout keeps that layout's embedded faces on machines that lack the font locally. Off by default. Fonts live on the presentation, not the master, and copying them can add megabytes, so they are only worth carrying when you want the embed to travel with the gallery.

Semantics are identical to ImportSlideOptions.embedFonts: binaries are copied under fresh /ppt/fonts/ names (deduped via the per-source copy registry, so a re-call carries each face once), the application/x-fontdata Default is added, and entries merge into this deck's p:embeddedFontLst de-duplicated by typeface + face slot. The carry is a whole-deck operation: it copies all the source's embedded fonts, not only the faces the grafted masters use, since the source list does not record which face belongs to which master.

Default ​

ts
false

layouts? ​

optional layouts?: (name, index) => boolean

Pick which layouts under each grafted master to bring. Receives the layout's p:cSld name and its zero-based index within that master's p:sldLayoutIdLst. Default: the whole family.

Parameters ​

ParameterType
namestring
indexnumber

Returns ​

boolean


masters? ​

optional masters?: (name, index) => boolean

Pick which of the source's masters to graft. Receives the master's p:cSldname ('' when unnamed) and its zero-based index in the source's p:sldMasterIdLst. Default: every master.

Parameters ​

ParameterType
namestring
indexnumber

Returns ​

boolean


primary? ​

optional primary?: boolean

Move the grafted masters to the front of p:sldMasterIdLst, ahead of the ones this deck already had, keeping their import order. Off by default: which master leads is a statement about what the deck is, so it is the caller's call rather than a side effect of grafting.

p:sldMasterIdLst order is not part of theme resolution: a slide resolves through its own layout's master, so this changes no existing slide's appearance. What it changes is the deck's identity in PowerPoint's UI: the list's first entry becomes Designs(1), which is the theme the Design tab shows and the one Design ▸ Variants applies. Graft a brand master into a generated deck without this and the deck still presents as the generator's stock theme, because the stub master was there first.

Reordering rewrites nothing but the list: relationships, ids, and every part outside presentation.xml are untouched, and a re-call is a no-op once the grafted masters already lead.

Default ​

ts
false

requireEqualSize? ​

optional requireEqualSize?: boolean

Require the source and destination slide sizes to match (default true). A grafted master is shipped into the layout gallery, not applied to existing slides, but a layout authored at a different canvas size shows up mis-scaled in that gallery, so the guard is on by default. Pass false to graft anyway.


tableStyles? ​

optional tableStyles?: boolean

Carry the source deck's table styles (ppt/tableStyles.xml) into this deck, so a table inserted on a grafted layout picks up the source's table styling instead of this deck's. Off by default: it rewrites an existing part rather than only adding new ones, so it is opt-in like embedFonts.

Without it a grafted master's layouts arrive but its table styling does not, and a new table falls back to whatever default this deck carries: for a generated deck, a stub whose default is the standard Medium Style 2 - Accent 1. The mismatch is visible: the same table renders in a different accent than it would in the source deck.

Styles union by styleId (a style this deck already defines wins, so a re-call is idempotent), while a:tblStyleLst@def (the default table style) is source-wins. Carrying the styles without the def would not fix the mismatch: the standard default GUID is one most templates also define, so the default would still resolve to the wrong style. The carry is whole-deck: it copies all the source's table styles, not only those the grafted masters use, since tableStyles.xml does not record which style belongs to which master.

Default ​

ts
false