Text Stamp Wrapping Error

Hi,
When converting Excel file to pdf, the watermark value that we added does not drop to the bottom line. We look forward to your help.

Our Code:
string kKopya = “Bulent Ercan Guner tarafindan 23.07.2019 09:20:37 tarihinde basilmistir. Boya Hazirlama Elemani Is Tarifine Göre Alinacak Egitimler Listesi - 00H-588 - 0”;

		kKopya = kKopya.Replace("ı", "i").Replace("İ", "I").Replace("ş", "s").Replace("Ş", "S").Replace("ğ", "g").Replace("Ğ", "G").Replace("Ü", "U").Replace("ü", "u");
        FormattedText formatText = new FormattedText(kKopya, System.Drawing.Color.Red, Aspose.Pdf.Facades.FontStyle.CourierBold, EncodingType.Cp1252, false, 8);
        string outputFileName = su.MapPath("../../QDMSFiles/TEMPFOL/") + tempFileName.Substring(0, tempFileName.LastIndexOf('.')) + "_1.pdf";
        

        Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(su.MapPath("../../QDMSFiles/TEMPFOL/") + tempFileName);
        Aspose.Pdf.TextStamp textStamp = new Aspose.Pdf.TextStamp(formatText);

        textStamp.Opacity = 0.4f;
		textStamp.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Left;
		textStamp.VerticalAlignment = Aspose.Pdf.VerticalAlignment.Top;
		textStamp.TopMargin = 30;              
        textStamp.RotateAngle = 0;
        textStamp.WordWrap = true;
        textStamp.LeftMargin = 10;
        textStamp.RightMargin = 10;
        textStamp.Justify = true;
        textStamp.Scale = false;

        for (int i = 1; i <= pdfDocument.Pages.Count; i++)
        {
            pdfDocument.Pages[i].AddStamp(textStamp);
        }
        pdfDocument.Save(outputFileName);

docs.zip (59.9 KB)

@srmbimser

You may please use new line character in order to split the string into two halves as follows:

string str = "Bulent Ercan Guner tarafindan 23.07.2019 09:20:37 tarihinde basilmistir.\nBoya Hazirlama Elemani Is Tarifine Göre Alinacak Egitimler Listesi - 00H - 588 - 0";

In case you still face any issue, please feel free to let us know.

we tested it this way. However, ‘\n’ did not pass the value to the bottom line.

@srmbimser

Would you please make sure to use Aspose.PDF for .NET 19.7 at your side. Also, please try to use following code snippet to add second part of stamp to the other line:

string str = "Bulent Ercan Guner tarafindan 23.07.2019 09:20:37 tarihinde basilmistir."
Facades.FormattedText text = new Facades.FormattedText(str);
text.AddNewLineText("Boya Hazirlama Elemani Is Tarifine Göre Alinacak Egitimler Listesi - 00H - 588 - 0");