Free Support Forum - aspose.com

Translate Arabic text

I’m using Aspose.Imaging.18.4.0 to process *.psd files using the following code:

 private void UpdateText(string filePath, string newText)
    {
        using (var image = Image.Load(filePath))
        {
            if (!(image is PsdImage)) return;

            var psdImage = (PsdImage)image;
            var layers = psdImage.Layers;

            for (var index = layers.Length - 1; index >= 0; index--)
            {
                var layer = layers[index];

                if (!(layer is TextLayer)) continue;

                var textLayer = (TextLayer)layer;
                textLayer.UpdateText(newText);
            }

            var imageOptions = new PsdOptions(psdImage);

            var fileName = Path.GetFileName(filePath);
            var outputFilePath = Path.GetDirectoryName(filePath) + "\\target_" + fileName;
            psdImage.Save(outputFilePath, imageOptions);
        }
    }

The source file is here: https://drive.google.com/open?id=1-XIGf2AYHqmPlGitFLqEnDcYxZtMH1PJ

If I used this file, which the text is written in Arabic language, the method UpdateText() throw an exception. and didn’t update the text

@tividan,

I have worked with the sample code and PSD file shared by you and have been able to reproduce the issue. An issue with ID IMAGINGNET-3008 has been added 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 IMAGINGNET-3008) have been fixed in this update.