Merging presentations with different themes/patterns

Hi,

When trying to merge multiple PowerPoint presentations into one that also have independent themes/slide patterns, is there a way to include those themes/patterns in the merged result presentation? I've done tests with the sample provided in v14.4.0.15 "MergingPresentations", but it doesn't do the trick. Also, your sample allows to select between "Use Destination Theme" and "Keep Source Formatting", but I have the feeling that the behavior of the selected option is inverted.

Kind regards

3 Replies

RM Ramaraj Marimuthu Syncfusion Team October 27, 2017 02:42 PM UTC

Hi Boris,

Yes, you can merge the presentation with both the  “Keep Source Formatting” and “Use Destination Theme” options.

We have attached a sample below for your requirement. Please try this sample and let us know whether this suits your requirement, otherwise please modify the below sample and update us back, so that we can reproduce the exact same scenario at our end.

Sample : Sample

Please let us know if you need any further assistances in this.

Regards,
Ramaraj Marimuthu
 



BM Boris Mouzo Izquierdo October 30, 2017 10:55 AM UTC

Hi,


From the provided sample there's something that keeps me puzzled. On line 94 you have the following code in the IF statement to use destination theme:

                        destinationPresentation.Slides.Add(slide.Clone(), PasteOptions.UseDestinationTheme, sourcePresentation);

Shouldn't the third parameter be "destinationPresentation" just like in the IF statement to use source theme where the code is:

                        destinationPresentation.Slides.Add(slide.Clone(), PasteOptions.SourceFormatting, sourcePresentation);

I tried the change manually but it seems the merge is not done as expected. Maybe it's because you always use the provided "destinationPresentation" PowerPoint file instead of creating a new third IPresentation object with the merge result of the two provided. I saw a similar effect when opening an already existing presentation and saving it with the same file name, I had to save it with a different file name.

Kind regards






RM Ramaraj Marimuthu Syncfusion Team October 31, 2017 02:28 PM UTC

Hi Boris,

Thanks for the details.

While merging the presentation, we have the below two paste options to maintain the formatting of the slide being merged.

UseDestinationTheme

KeepSourceFormatting

While merging a slide from a source presentation to destination presentation, the slide will be added to the destination presentation. This will not create a new PowerPoint presentation.

Please find the below sample to merge a slide form one presentation to another using “KeepSourceFormatting” option.

Sample: KeepSourceFormattingSample

Please find the below sample to merge a slide form one presentation to another using “UseDestinaionTheme” option.

Sample: UseDestThemeSample

Please verify the samples and let us know whether this satisfies your query, otherwise can you please update us the source, destination presentations and expected merged presentation along with the code snippet you are trying to use. This will be helpful for us to proceed further in this.

Please let us know if you need any further assistance in this.

Regards,
Ramaraj Marimuthu


Loader.
Up arrow icon