Free Support Forum -

Underline and strikethrough lost after focusing on the text in file saved with Aspose.PSD (C# .NET)


We are processing the source.psd file from the attached archive using the following code:

var sourceFile = @"d:\work\psd\source.psd";
var targetFile = @"d:\work\psd\target.psd";
using (var image = (PsdImage) Image.Load(sourceFile))
    var layers = image.Layers;
    var textLayer = (TextLayer) layers.Single(layer => layer is TextLayer);

    textLayer.TextData.Items[0].Style.Underline = true;
    textLayer.TextData.Items[1].Style.Strikethrough = true;


    image.Save(targetFile, new PsdOptions(image));

When the target.psd is opened, the desired formatting appears:
image.png (3.1 KB)

But when the text is focused in Photoshop using the Horizontal Type Tool, the underline and strikethourh formattings disappear and the target file looks like the source (this is not the case for other kinds of formatting):
image.png (2.9 KB)

Is this a bug, or are we doing something wrong? (64.1 KB)

Thanks for any help!


I have tested the sample files provided by you and have created a ticket with ID PSDNET-664 in our issue tracking system for further investigation and resolution. We will share the feedback with you as soon as the issue will be fixed.