class PdfMixFragment implements Closeable {

    public PDPage nextPage() {
        if (input.isReverse()) {
            return handler.getPage(pages.removeLast());
        }
        return handler.getPage(pages.removeFirst());
    }

    private  PdfMixFragment(PdfMixInput input, PDDocumentHandler handler);

}