When text is updated with / characters, file cannot be opened in Photoshop


#1

Hi,
it seems that when you try to update text layer content with / (forward slash) character, resulting file cannot be opened in Photoshop.

private static 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("/");
            }

            var imageOptions = new PsdOptions(psdImage);

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

program_error.zip (12.7 KB)

This issue is really critical for us, can you please give us some indication of when it will be fixed?


#2

@rlaskowski.sdl,

I have observed the issue shared by you please try using latest Aspose.PSD for .NET 19.8 on your end first. If the issue still persist then please also share the snapshot of error received while opening saved PSD in Photoshop along with Photoshop version information.


#3

image.png (14.1 KB)
And yes, we are using latest version of the PSD library


#4

@rlaskowski.sdl,

I have worked with sample code and source file shared by you using Aspose.PSD 19.8. For further investigation can you please share which Photoshop you are using on your end to open the file.