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

Free Support Forum - aspose.com

Strikethrough portion rendering issue

Hi,

I have found a bug in rendering of strikethrough in Aspose.Slides 18.5 (.NET). My goal is to split an existing portion of text into two parts and apply colour and strikethrough to the first part. When I write code to do this and then save the slide to a thumbnail (or SVG, or save the presentation to PDF) the second part also is shown with strikethrough.

My code is below and the test document showing the problem and the output result are in the attached zip.

Any ideas on a workaround to get the correct output when saving to image/svg/pdf? If not it would be great to have this fixed as this will otherwise block our development.

thanks,

Robin

        var lic = new License();
        lic.SetLicense("Aspose.Total.lic");
        var p = new Presentation("test.pptx");
        var s = p.Slides.First();

        var shp = s.Shapes.OfType<AutoShape>().First();
        var frame = shp.TextFrame;
        var para = frame.Paragraphs[0];
        var port = para.Portions[0];

        // split the portion into two parts
        var newPort = new Portion((Portion)port);
        newPort.Text = newPort.Text.Substring(5);
        port.Text = port.Text.Substring(0, 5);
        para.Portions.Add(newPort);

        // try to make the first part orange and strikethrough
        port.PortionFormat.FillFormat.SolidFillColor.Color = Color.Orange;
        port.PortionFormat.FillFormat.FillType = FillType.Solid;
        port.PortionFormat.StrikethroughType = TextStrikethroughType.Single;

        // save an image of the result this is incorrect
        var image = s.GetThumbnail(3,3);
        image.Save("test.png");
        Process.Start("test.png");

        // save as pptx - this is actually correct
        p.Save(@"g:\out.pptx", SaveFormat.Pptx);

docs.zip (38.5 KB)

@rwg,

I have worked with your presentation and have created an issue with ID SLIDESNET-40202 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-40202) have been fixed in this update.