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.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.