getNumPages() Returns the number of pages in the current document as an integer. Sample syntax var numPages = ViewONE.getNumPages();