JavaScript > JavaScript for Acrobat API Reference > JavaScript API > Doc > Doc properties > numPages

numPages
 
The number of pages in the document.
Type
Integer
Access
R
Example 1
	console.println("There are " + this.numPages + " in this document");
Example 2
Delete the last page from the document. The (0-based) page number of the last page in the document is this.numPages - 1.
	this.deletePages({ nStart: this.numPages - 1 });