}
file = File.createTempFile("extract_pdf", ".tmp");
indexInfo.addDeleteFile(file);
output = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
PDFTextStripper stripper = new PDFTextStripper();
stripper.writeText(document, output);
/*logger.debug("PDF extraction completed");
BufferedReader reader;
try {
reader = new BufferedReader(new FileReader(file));
String line = null;