Click or drag to resize

getPageCount Method

Gets the page count of the document currently being viewed in the PdfWebControl instance.

Syntax
JavaScript
function getPageCount();

Parameters

None

Return Value

Type: Integer

Returns number of pages in the currently open document.

Remarks

This method will return a number less than 1 if no pages are found or a document is not open.

Examples
JavaScript
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance
window.alert("This document has " + myApi.getPageCount() + " pages.");
See Also