We regret to share that we lost the file that was shared by you and now the link has been expired. Would you please be kind enough to share the file again with us?
We tested using below two code snippet and 24.8 version of the API and faced the same exception.
var document = new Aspose.Pdf.Document(dataDir + "Bad_ITB FAF FY24 263 C17006 Building K Analyzer_Plan.pdf");
var editor = new PdfContentEditor();
editor.BindPdf(document);
//Replace all the matching keys in the text
editor.ReplaceText("{{item.number}}", "1"); // Exception occurs here
editor.Save(dataDir + "output.pdf");
editor.Document.FreeMemory();
editor.Document.Dispose();
editor.Dispose();
editor = null;
var doc = new Aspose.Pdf.Document($"{dataDir}Bad_ITB FAF FY24 263 C17006 Building K Analyzer_Plan.pdf");
var textFragmentAbsorber = new TextFragmentAbsorber("{{item.number}}");
doc.Pages.Accept(textFragmentAbsorber); // Exception occurs here
var textFragmentCollection = textFragmentAbsorber.TextFragments;
foreach (var textFragment in textFragmentCollection)
{
//If add this line, it's OK.
textFragment.Text = "1";
}
doc.Save($"{dataDir}out.pdf");
The issue has been generated in the issue tracking system under the ticket ID PDFNET-58082. We will let you know via this forum thread as soon as it is resolved. We apologize for the inconvenience.