Description
Gets the index of a given object.
Applies to
Syntax
If calling the function on a PDFDocument object:
long IndexOf(PDFPage page)
If calling the function on a PDFPage object:
long IndexOf(PDFContent content)
Return value
Long. Returns 1 if it succeeds and -1 if it fails. For more errors, see the Error Codes.
Usage
Call the function to get the index of a PDFPage object in a PDFDocument object, or the index of a PDFContent in a PDFPage object.
The index of the objects are determined by the orders they are added, starting at 1. If one object is removed, the indexes of the remaining objects will be reordered.
Examples
This example gets the index of the specified PDFPage object in the current PDFDocument object:
//Get the index of lpdf_page Long ll_index ll_index = lpdf_doc.indexof(lpdf_page)
See also
PDFDocument objects:
PDFPage objects: