Java code to convert doc/docx/pdf formated files to txt format. You can directly copy paste this code in eclipse/net-beans and run it.
PREFACE Use this string variable to locate your file which you wanted to convert in txt format.
RESULT Use this variable to locate your file in which you wanted your converted file.
Dependency
It depend on Itext library & on Apache POI-3.10 library.
You have to download jar files of above dependency and need to build it.
Link to download itext jars
Link to download apache poi jars