Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master Layouts and Master Slides #146

Open
kajda90 opened this issue Aug 16, 2017 · 9 comments
Open

Master Layouts and Master Slides #146

kajda90 opened this issue Aug 16, 2017 · 9 comments

Comments

@kajda90
Copy link

kajda90 commented Aug 16, 2017

Hi @gitbrent,

I've tried to find a contact information in this repository but unsuccessfully; thus, I've chosen this way.

First of all, I really appreciate your library, it's really helpful to us and that's also the reason why I try to contribute. However, I've noticed that the feature you're calling slide master is not exactly what it is supposed to be 🙂

As I got principle in your library, master slides work as a set of object and style rules that are applied to a newly created slide in a static way. That means, elements defined in master slide object are added to every single slide even if these slides use the same master. Slide layouts are generated for each slide.

Whereas if you generate a file in PowerPoint, it works as follows: a slide is attached to a slide layout, not to the master slide. So, if you want multiple slides to have the same layout, you just link them to the slide layout file. These slide layouts are then attached to the master files.
This principle ensures user who opens such a generated file to be able to update slide layouts and master slide and to apply the changes they perform to all the slides that follow a particular slide layout. And this is what I need.

I know it's difficult to implement methods for creating master file or layout because these files' structure seems to be really complicated. Thus, I'd suggest to pass ready XML definitions of master file and slide layouts to the library. Then, at the moment of creating a slide, name of a layout (that the slide should be attached to) would be passed as an argument. This ensures proper generating relation between layouts and slides.

Now I need your opinion. We need to work with proper master slides and slide layout so I'm ready to implement this. The original solution of master slide would be preserved to provide backward compatibility, of course.

I hope I described the issue clearly.

Thank you in advance 🙂

@kajda90 kajda90 changed the title Master Laoyuts and Master files Master Laoyuts and Master Slides Aug 16, 2017
@gitbrent gitbrent self-assigned this Aug 17, 2017
@gitbrent
Copy link
Owner

Hi @kajda90

You're absolutely right. I am using "masters" as an object pattern to cheat and not have to deal with the formal layout style. :-)

I would, obviously, prefer the library to generate presentations that are as close 100% correct as it can, so i'd be interested to see what you can come up with.

Thanks for your interest and for all the contributions!

@gitbrent gitbrent changed the title Master Laoyuts and Master Slides Master Layouts and Master Slides Aug 17, 2017
@gitbrent gitbrent modified the milestones: 1.8.0, 2.0.0 Sep 4, 2017
@gitbrent
Copy link
Owner

gitbrent commented Sep 6, 2017

The initial version of this feature is now live.

The old way of creating masters is gone - replaced with a new method defineSlideMaster() that creates actual Master Slide Layouts in PowerPoint.

Come Version 2.0, we should be integrating 100% compliant Masters by allowing the creation of the actual Master Slide in addition to just the new Layouts. I'm walking it forward in phases for continuity and ease of use for both new and current users.

Thanks for all the work on this non-trivial feature @kajda90 !!

@gitbrent gitbrent modified the milestones: 2.0.0, 1.8.0 Sep 6, 2017
@heavysixer
Copy link

Is there a way to use a manually created presentation and their master layout and master slides within this tool? I was just thinking that the layout and design could be done much easier using the native tool and then data applied dynamically using this library.

@jcanaan8806
Copy link

@heavysixer that's what I was thinking. While I really like the options to define the master slides from JS, it would be very interesting if you could somehow just include the contents of a pre-branded ppt file in the library, and use that. Although, I'm not quite sure how you would add new sliders following a master slide layout if you haven't defined it in the JS yourself.

@gitbrent
Copy link
Owner

Unfortunately, importing existing Presentations is one of the features I have no plans to support, so that kind of eliminates the use of existing master layouts.

@gitbrent gitbrent removed this from the 2.0.0 milestone Feb 16, 2018
@CoderTrx
Copy link

CoderTrx commented Jun 6, 2019

hi @gitbrent , thank you for building this wonderful library. I wanted to check if there is a way to update/create the main master layout.
image

@kevinresol
Copy link
Contributor

image

I would also like to manipulate both "Slide Master" and "Layout"

@libardo
Copy link

libardo commented Mar 9, 2021

@gitbrent Hi Brent, thank you for creating this wonderful library. I think an option to import an existing master layout from a customer's presentation would be a really useful feature. Is that against your philosophy? Have you looked into it and determined it to be a tough problem? Would it be possible to commission such a feature or would you accept a pull request?

@gitbrent
Copy link
Owner

@libardo - pptxgenjs will never ingest other files. we create presentations, thats it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants