Code Monkey home page Code Monkey logo

Comments (6)

sergey-tihon avatar sergey-tihon commented on May 13, 2024

PresentationBuilder is not designed to work with already opened PresentationDocument.
Original implementation rely on assumption that you always create new PresentationDocument using SlideSource.

You may want to take a look at FluentPresentationBuilder that wrap target PresentationDocument and provided API like AppendSlides

PresentationDocument that is released in 1.5.0-beta* packages uses FluentPresentationBuilder internally. But IIRC, it is may be slightly not ready for use case. It works well (even in production 😊) when FluentPresentationBuilder wrap empty presentation at the beginning, but it still not fully-enumerate internals of PresentationDocument that it wraps.

P.S. As workaround you always can create 3rd PresentationDocument and copy there slides from sourcePreDoc and from outputDoc.

from clippit.

ashahabov avatar ashahabov commented on May 13, 2024

Looks like FluentPresentationBuilder.AppendSlides() also rely on that PresentationDocument instance passed in constructor is empty.

Will see some workaround.

from clippit.

sergey-tihon avatar sergey-tihon commented on May 13, 2024

Why do not you like workaround to create 3rd PresentationDocument and copy all slides there?

from clippit.

ashahabov avatar ashahabov commented on May 13, 2024

For example, I wanna copy only the first slide from test1.pptx into test2.pptx. With this approach, I will touch one slide from the first presentation and all slides from the second. Even without considering performance issue, I think the chance of corruption is high.

In other words, you know that moving slide to an external presentation with its all references (layout, master, theme, chart, etc) is a tricky part, hence I'd like to avoid extra touching those references.

from clippit.

ashahabov avatar ashahabov commented on May 13, 2024

Today I made some implementation and it works for simple cases, but I do not know where it might go off 😐

from clippit.

ashahabov avatar ashahabov commented on May 13, 2024

I think the issue should be closed since PresentationBuilder designed as a builder that creates slides deck from scratch, as mentioned above.

from clippit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.