Hello.
We have a simple app (testing purposes) that iterates through all the text layers of a PSD file, creates a new text Portion with empty text, adds it to the layer, and saves it.
The end result seems to be wrong, or something happens in the processing itself, as we get some shifted layers and/or shifted text inside them.
Code:
var psdImage = (PsdImage)Image.Load(psdFilePath);
var imageOptions = new PsdOptions(psdImage);
var psdSaveName = $“{psdSavePath}.psd”;
psdImage.Save(psdSaveName, imageOptions);
psdImage.Dispose();
Starting from the document:
LIssue2.zip (122.8 KB)
We get the following document:
LIssue2_result.zip (108.4 KB)
A picture of the differences (using WinMerge app for comparison):
image.png (84.9 KB)
In the resulted document, the second text layer seems to be moved to the left and cut, but here’s the kicker: If you open the resulting document in Photoshop and click on that particular shifted text, it will be repaired back to expected position.
Not sure why this is happening, but it seems to me like it only happens with longer texts and has something to do with the layer size or the container size?
I first reproduced this after iterating through layers and adding portions to each one, but it manages to reproduce just by opening and saving the doc.
Any idea of what is happening?
Version used [Aspose.PSD 24.9.0]
Let me know if you need further information