Getting Invalid Font Name while replacing fond in PDF

We are replacing existing font with new fond & removing unused font in pdf file. Using below code for this. It is working as expected if the pdf file has single page. Getting invalid font name exception when the pdf has 2 pages. We are using 24.5.1 version with proper license.

var pdf = new Document(pdfStreamIN);

TextFragmentAbsorber absorber = new TextFragmentAbsorber(new TextEditOptions(TextEditOptions.FontReplace.RemoveUnusedFonts));
absorber.TextSearchOptions.IgnoreResourceFontErrors = true;
pdf.Pages.Accept(absorber);
// Iterate through all the TextFragments
foreach (TextFragment textFragment in absorber.TextFragments)
{
// If the font name is ArialMT, replace font name with Arial
if (textFragment.TextState.Font.FontName == “Helvetica-Bold”)
{
textFragment.TextState.Font = FontRepository.FindFont(“ArialMT,Bold”);
}

if (textFragment.TextState.Font.FontName == "Helvetica")
{
    textFragment.TextState.Font = FontRepository.FindFont("ArialMT");
}

}

pdf.Save(pdfStreamOUT, SaveFormat.Pdf);

@vasanthm
Please attach the document with which this occurs so that we can reproduce the problem.

Hi. Thanks for the response. Here I am attaching the PDF which is causing the issue.
test2_output_test.pdf (3.7 KB)

@vasanthm
Thank you for the document you provided.
I will study the data provided and write to you tomorrow.

@vasanthm
Issue reprodused - its a bug.
I will create a task for the development team.

@vasanthm
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-57345

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.