Different font colors after cloning

Hello

When merging slides, we often have the problem that the font colors aren't the same as before. As a sample, I attached three slides. If you merge them like this...

for (int i = 0; i < presentation.Slides.LastSlidePosition; i++)
{
// Gets the slide
slide = presentation.GetSlideByPosition(i + 1);

// Clones the slide and attaches it after the already existing slide
clonedSlide = presentation.CloneSlide(slide, Presentation.Slides.LastSlidePosition + 1, Presentation, idList);
}

.. the font color in the third slide of the merged file changed (see Comparision.jpg).

Is it possible to fix this?

Best regards

Hello,

It seems that problem occurs because of DeleteUnusedMasters().

It does not occur using the following code to merge the presentations. Note: I have commented the DeleteUnusedMasters().

I ran it on Aspose.Slides for .NET 3.0.1.15296. Please see the merged.ppt

C#

//source directory
string srcDir = @"D:\downloads\itcore";

//Get all the files
string[] files = Directory.GetFiles(srcDir);

//Target presentation
Presentation target = new Presentation();

//Merge slides of other presentations into target presentation
foreach (string file in files)
{
    //Read the source
    Presentation source = new Presentation(file);

    //New idList for new source
    SortedList idList = new SortedList();

    //Clone all slides into target
    for (int i = 1; i <= source.Slides.LastSlidePosition; i++)
    {
        Slide sourceSld = source.GetSlideByPosition(i);
        int lastSlidePosition = target.Slides.LastSlidePosition;
        source.CloneSlide(sourceSld, lastSlidePosition + 1, target, idList);
    }//for
}//foreach

//Remove the first slide
target.Slides.Remove(target.GetSlideByPosition(1));

//target.DeleteUnusedMasters();
target.DeleteHandout();

//Write the output
target.Write("c:\\merged.ppt");

Hello

So it seems that DeleteUnusedMasters() deletes something which it still uses, doesn't it? Can you confirm that this is a bug in the DeleteUnusedMasters method?

Best regards

Yes, it needs to be fixed.

The issues you have found earlier (filed as 8666) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.