if(f!=null) {
Logger.getLogger(PdfFolderParser.class.getName()).log(Level.FINEST, owningThread+" - Loading pdf document "+f.getName());
PDDocument pdfDoc = PDDocument.load(f);
Logger.getLogger(PdfFolderParser.class.getName()).log(Level.FINEST, owningThread+" - Ripping pdf");
PDFTextStripper pdfTextStripper = new PDFTextStripper();
String text = pdfTextStripper.getText(pdfDoc);
pdfDoc.close();
String[] lines = text.split("\n");
String line = lines[rule.getLine()];
if (!line.contains(rule.getPattern())) {
Logger.getLogger(PdfFolderParser.class.getName()).log(Level.FINEST, owningThread+" - Pattern "+rule.getPattern()+" not found in line "+rule.getLine()+" exiting");