Alignment issue with FormattedText with TextStamp in the page header

Hi Team,

Package: Aspose.Pdf 22.3

We are facing alignment issue with FormattedText with TextStamp in the page header, text is not aligned properly when we have multiple line of text in header. Text is getting clipped off from the page.

Source Code to reproduce:
var document = new Aspose.Pdf.Document();
Page p = document.Pages.Add();
p.SetPageSize(597.6, 842.4);
p.Paragraphs.Add(new TextFragment(“Test page 0 对以下试验进行了调查对以下试验进行了调查对以下试验进行了调查对以”));

        var headerText = new FormattedText("添付ファイル#1 - セフォタキシムナトリウムと包装材料バイアルの適");
        headerText.AddNewLineText("分析レポート: AAA09074, ユーロフィンサンプル番号: ZN22AA0139-1, バージョン");
        headerText.AddNewLineText("Page 3 of 9");
        var headerTextStamp = new TextStamp(headerText);
        headerTextStamp.TextAlignment = HorizontalAlignment.Right;
        headerTextStamp.TextState.FontSize = 8;
        headerTextStamp.TextState.Font = FontRepository.FindFont("Arial"); ;
        headerTextStamp.HorizontalAlignment = HorizontalAlignment.Right;
        headerTextStamp.VerticalAlignment = VerticalAlignment.Top;
        headerTextStamp.TopMargin = 15;
        headerTextStamp.RightMargin = 72 * 0.5;
        document.Pages[1].AddStamp(headerTextStamp);

document.Save(“Test.pdf”, Aspose.Pdf.SaveFormat.Pdf);

Regards,
Shivaraj Hiremath

@Kkyadav07

We were able to notice the issue in our environment while testing the scenario with 22.5 version of the API. Therefore, an issue as PDFNET-51908 has been logged in our issue tracking system. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.