Found this really nice class! Further, you can add functionality to fit your needs.
Probably these will help you to add functionality:
If it doesn't work, check if you can highlight/mark your text when opening in Adobe Reader (if you can't, the text in your file is probably saved as geometric curves), check also for the encoding.