Added function to get status of all pages of a document via one query.