ensure that document pages are kept in order for indexing