Hi Markandey,
Thanks for contacting support.
Aspose.Pdf for .NET supports the feature to search the contents of entire PDF file but for that reason you need to use Regular Expression. Please note that when traversing through whole PDF file, you can get the formatting information of each TextFragment but when extracting the text, it is extracted as plain text because TextDevice or related classes only extract the contents irrespective of their formatting. Furthermore, this extraction also depends upon the format of resultant output file i.e. when extracting the contents to plain text file, the formatting is lost. However you can transform the PDF file to either DOC or HTML format and when using this approach, the formatting of TextFragments is preserved.
For further details, please visit