From the 5185AcroJS document:
deletePages
Parameters: [nStart], [nEnd]
Returns: Nothing
Deletes pages from the document.
nStart is the zero-based index of the first page in the range of pages to be deleted. The optional
nEnd parameter indicates the last page in the range of pages to be deleted. If nEnd is not
specified then only the page specified by nStart is deleted.
Both nStart and nEnd have a default value of zero, so if this.deletePages() is executed, the first
page (page 0) will be deleted.
See also the insertPages, extractPages and replacePages methods.
Note: You cannot delete all pages in a document: there must be at least one page
remaining.