Free Support Forum - aspose.com

Exceptions thrown for specific PSD file

Hi!

We are trying to process the .psd file from the archive below using the following code:

var licenser = new AsposeLicenser();
licenser.LoadLicense();
using (var image = (PsdImage) Image.Load(filePath))
{
    var textLayer = (TextLayer) image.Layers.First(layer => layer is TextLayer);
    try
    {
        var textData = textLayer.TextData;  // exception here...
    }
    catch (Exception) { }

    textLayer.UpdateText("abc");  // exception here...
}

Exceptions are thrown by Aspose.PSD from the lines indicated by comments above. Note that the textLayer.Text property is populated correctly.

A.zip (384.4 KB)

Thanks!
Arnold

@arnoldbeilandevozon,

I have tested the file on my end and have reproduced the issue. A ticket with ID PSDNET-677 has been created to investigate and resolve the issue. We will share the good news with you as soon as the issue will be fixed.

Hi,
is there any update on this issue, do you know when the fix will be delivered?
Thanks

@rlaskowski.sdl

Can you please try using following sample code on your end using Aspose.PSD for .NET 20.7.

string dataDir = "PSDNET677_1\\";
            var sourceFilePath = dataDir + "A.psd";
            using (PsdImage image = (PsdImage)Image.Load(sourceFilePath))
            {
                var textLayer = (TextLayer)image.Layers[1];
                var unused = textLayer.Text; // no exception here...
                var unused1 = textLayer.TextData; // no exception here...
                textLayer.UpdateText("abc");  // no exception here...                
            }

PSDNET677_1.zip (374.3 KB)

Hi!

Please note that because of Regression: Aspose.PSD 20.7.0 breaks font sizes for older files we could not update to 20.7 so we will postpone testing until a newer version is available (currently the font size issue is more severe than this one).

Regards,
Arnold

@arnoldbeilandevozon

We are sorry for your inconvenience. I have added a regression based ticket to address the issue shared in concerned thread. We request for your patience and will share the good news with you as soon as the issue will be fixed.