Document document1 = new Document(String.valueOf(file));
TextFragmentAbsorber TextFragmentAbsorber = new TextFragmentAbsorber();
document1.getPages().get_Item(1).accept(TextFragmentAbsorber);
…...How to extract text from pdf doc element by element, nodes by...element, But it is returning text in this order(header, footer...