Can you please share a little more details regarding your requirement? Do you want to extract text with formatting or you just want to get formatting information of the text? If you just want to get the formatting information then what information would you be interested in? Do you want to find information about a string, a paragraph or a page etc?
Please share some further details, so we could help you out. Regards,