After Replace Text of PDF, One Line become Two Lines

Env

  • Windows 11
  • Aspose.PDF for .NET 24.2

Code

void Test()
{
	var doc = new Aspose.Pdf.Document(@"C:\Users\Administrator\Desktop\test\1.pdf");
	var textFragmentAbsorber = new TextFragmentAbsorber("2021年12月03日");
	doc.Pages.Accept(textFragmentAbsorber);
	foreach (TextFragment textFragment in textFragmentAbsorber.TextFragments)
	{
		textFragment.Text = "2021年11月22日";
	}
	doc.Save(@"C:\Users\Administrator\Desktop\test\out.pdf");
}

Test File

test.zip (370.5 KB)

@xucongli1989

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56759

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.