FileInputStream fi = new FileInputStream( f );
PDFParser parser = new PDFParser( fi );
parser.parse();
fi.close();
COSDocument cd = parser.getDocument();
PDFTextStripper stripper = new PDFTextStripper();
String result = stripper.getText( new PDDocument( cd ));
cd.close();
return result;
}