.NET Error while processing PDF

We are getting the below .NET error while processing the attached PDF. Could you kindly look into this and let us know?

ASPOSE PDF Details:

Aspose.PDF for .Net 10.3.0

Item has already been added. Key in dictionary: '173.480000029208' Key being added: '173.480000029208'
at System.Collections.SortedList.Add(Object key, Object value)
at .?.(ArrayList ) at .?..ctor(ArrayList ) at .?.()
at Aspose.Pdf.Text.TextAbsorber.(? , Boolean ) at Aspose.Pdf.Text.TextAbsorber.Visit(Page page)
at Aspose.Pdf.PageCollection.Accept(TextAbsorber visitor)
at LOEApprovalEmail.Program.readFiles(String path, Int32 seriesID, String pathURL)
at LOEApprovalEmail.Program.Main(String[] args)

Hi Aravind,


Thanks for using our API’s.

I have tested the scenario using Aspose.Pdf for .NET 10.9.0 where I have used following code snippet to search specific string inside PDF file and I am unable to notice any issue. Can you please try using the latest release and in case the issue still persists, please share the code snippet you are using. We are sorry for this inconvenience.

[C#]

Document doc = new
Document(“c:/pdftest/pol092915ba.pdf”);<o:p></o:p>

//create TextAbsorber object to find all instances of the input search phrase

TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("الارتفاع");

//accept the absorber for all the pages

doc.Pages.Accept(textFragmentAbsorber);

//get the extracted text fragments

TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;

//loop through the fragments

foreach (TextFragment textFragment in textFragmentCollection)

{

foreach (TextSegment textSegment in textFragment.Segments)

{

Console.WriteLine("Text : {0} ", textSegment.Text);

Console.WriteLine("Position : {0} ", textSegment.Position);

Console.WriteLine("XIndent : {0} ",textSegment.Position.XIndent);

Console.WriteLine("YIndent : {0} ",textSegment.Position.YIndent);

Console.WriteLine("Font - Name : {0}",textSegment.TextState.Font.FontName);

Console.WriteLine("Font - IsAccessible : {0} ",textSegment.TextState.Font.IsAccessible);

Console.WriteLine("Font - IsEmbedded : {0} ",textSegment.TextState.Font.IsEmbedded);

Console.WriteLine("Font - IsSubset : {0} ",textSegment.TextState.Font.IsSubset);

Console.WriteLine("Font Size : {0} ", textSegment.TextState.FontSize);

Console.WriteLine("Foreground Color : {0} ",textSegment.TextState.ForegroundColor);

}

}

Many Thanks for getting back to us. Grateful, if you could kindly provide a test license file, so that we could validate and get back.

Hi Aravind,

Please visit the following link for instructions on how to Get a temporary license.