add support for inserting a page into the middle of the document