Take itemsPerPage into account in /documents.html