else if (fileExt.equals(".pdf")) {
try {
PDFParser parser = new PDFParser(fis);
parser.parse();
PDDocument pdDoc= parser.getPDDocument();
StringWriter stringWriter = new StringWriter();
PDFTextStripper stripper = new PDFTextStripper();
stripper.setLineSeparator("\n");
stripper.writeText(pdDoc, stringWriter);
text = stringWriter.toString();
stringWriter.close();
pdDoc.close();
}
catch (Exception e) {
_log.error(e.getMessage());
}
}