We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose support searching of line beak and round brackets ()

Hi Support,
I am using TextFragmentAbsorber class for finding the text in PDF document. I have a following scenarios in which I am unable to find the text:
1: Text contains round brackets ().
2: Text contains line break for example:

(line break)

My code snippet is following:

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(new MemoryStream(_documentBytes, true));
TextFragmentAbsorber textFragment = new TextFragmentAbsorber(@"(?i)\b" + phrase + @"\b");
TextSearchOptions textSearchOptions = new TextSearchOptions(true);
textFragment.TextSearchOptions = textSearchOptions;
TextFragmentCollection textFragmentCollection = textFragment.TextFragments;

Does Aspose support the above scenarios.


You can surely write regular expression in order to find different formatted text phrases. However, if you are facing some issue, please share your sample PDF document along with information of text you want to find. We will test the scenario in our environment and address it accordingly.