Skip to content

TypeError: slide.useSlideLayout is not a function #57

@andrew-t-adaas

Description

@andrew-t-adaas

Greetings, thank you for the great tool first, I know that you just uploaded new changes, but I already have a question about them.

pptx-automizer version: 0.3.0
env: Node v16.13.0 + TS

I want to combine several slides together into one slide deck, they have different layouts and I've seen that you've updated a version with the changes I'm looking for (hopefully).
I've tried to use the same way as in the example:

// Import a slideMaster and its slideLayouts:
pres.addMaster('SlidesWithAdditionalMaster.pptx', 1);

// It is also possible to use the original slideLayout of any added slide:
pres.addSlide('SlidesWithAdditionalMaster.pptx', 3, (slide) => {
  // To use the original master from 'SlidesWithAdditionalMaster.pptx',
  // we can skip the argument:
  slide.useSlideLayout();
  // This will also auto-import the original slideMaster, if not done already, 
  // and look for the created index of the source slideLayout.
});

But it seems like slide.useSlideLayout is missing in export, or I did something wrong.

Also, the same situation with :

 // Always use the original slideMaster and slideLayout of any
 // imported slide:
 autoImportSlideMasters: true,

Thanks in advance, looking forward to your reply!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions