@Override
    protected void processPages(PDPageTree pages) throws IOException {
        for (PDPage page : pages) {
            if (getCurrentPageNo() >= getStartPage() && getCurrentPageNo() <= getEndPage()) {
                processPage(page);
            }
            pageIndex++;
        }
    }
See TIKA-2845 for why we need to override this.

@param pages
@throws IOException
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/AbstractPDF2XHTML.java