You can use iText if the source PDF is mostly text. Images etc. Quite difficult to handle during parsing. If it's just text, it's as simple as 10 lines of code. See the iText Guide for examples.
For writing text files there is only Apache POI. This may be a little difficult to understand, but for such a simple task this should not be a problem.
Jes
source share