We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

TextPortion Color is not cloned properly

After cloning a slide, Information about the text formatting is lost.
This also happens with handmade slides from PowerPoint.

I am using Version v18.7.0
Below a Full Sample which reproduces the Error.

using System;
using System.Drawing;
using System.IO;
using Aspose.Slides;

namespace ErrorSample
    class Program
        public static void Main()
            // set your license Pathhere
            var licensePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Aspose.Total.lic");
            var license = new License();
            using (var file = new FileStream(licensePath, FileMode.Open))

            using (var inPres = new Presentation())
            using (var outPres = new Presentation())
                var shape = inPres.Slides[0].Shapes.AddAutoShape(ShapeType.CircularArrow, 1, 1, 1, 1);
                var textFrame = shape.TextFrame;
                textFrame.Text = "Hello World";
                shape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FillFormat.SolidFillColor.Color = Color.HotPink;

                // has one Shape

                // should obviously be 'Color [A=255, R=255, G=105, B=180]'
                var inColor = shape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FillFormat.SolidFillColor.Color;

                var slideClone = outPres.Slides.AddClone(inPres.Slides[0]); // this is where the magic happens, or fails to happen in your case

                // has also one Shape

                var autoShape = slideClone.Shapes[0] as AutoShape;
                // is really our 'Hello World' shape

                var outColor = autoShape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FillFormat.SolidFillColor.Color;
                // this should also be 'Color [A=255, R=255, G=105, B=180]' but is 'Color [A=255, R=0, G=0, B=0]'

                // this should be true
                Console.WriteLine(outColor == inColor);


I have worked with sample code shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-40443 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

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

Saw the Ticket-ID in your changelogs. Tested this one with Aspose Slide Net 18.9 with the Codesample above, Still not working, my other Bug I reported is now fixed, so not an issue with my nuget.


We have observed your requirements and like to share that in order properly saving and cloning of fill format colors you need to set FillFormat.FillType:

// Set portion FillType to Solid
shape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FillFormat.FillType = FillType.Solid;

// Set portion SolidFillColor             
shape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FillFormat.SolidFillColor.Color = Color.HotPink;

ok I edited my code according to your description, a note in your Documentation that the properties are order sensetive and the fact that you have to set the color last in order to work properly would be great.
Thank you for your help.


It’s good to know things are working on your end. Please feel free to share if there is any issue incurring on your end.