Find and Replace Text Throw Error Incorrect input string passed for font

Env

  • Windows 11
  • Aspose.PDF for .NET 24.1

Code

void Test()
{
	var doc = new Aspose.Pdf.Document(@"C:\Users\Administrator\Desktop\test\test.pdf");
	var textFragmentAbsorber = new TextFragmentAbsorber("2008");
	doc.Pages.Accept(textFragmentAbsorber);
	var textFragmentCollection = textFragmentAbsorber.TextFragments;
	foreach (var textFragment in textFragmentCollection)
	{
		textFragment.Text="2024";
	}
	doc.Save(@"C:\Users\Administrator\Desktop\test\out.pdf");
}

Error

Incorrect input string passed for font STSong-Light-UniGB-UCS2-H
image.jpg (261.0 KB)

Test File

test.pdf (8.8 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-56385

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.

I think this is an array overflow issue, hope it can be fixed soon.

@xucongli1989

We will definitely prioritize the ticket on first come first serve basis and as soon as it is resolved, we will let you know via this forum thread. Please spare us some time. We are sorry for the inconvenience.