GetIndex
Gets page index
Syntax
expression.GetIndex();
expression - A variable that represents a ApiPage class.
Parameters
This method doesn't have any parameters.
Returns
number
Example
Get page index of the first page in document and display it in the text field.
// How can I get the index using a page in a PDF document?
// Get the index for a page in a PDF document.
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 32]);
page.AddObject(textField);
textField.SetValue('Page index is: ' + page.GetIndex());