IndexOf
PowerScript function
Description
Gets the index of a given object.
Applies to
PDFDocument object in Objects and Controls
PDFPage object in Objects and Controls
Syntax
If calling the function on a PDFDocument object in Objects and Controls:
|
1 |
long IndexOf(PDFPage page) |
|
Argument |
Description |
|---|---|
|
page |
The name of the PDFPage object in the PDFDocument. |
If calling the function on a PDFPage object in Objects and Controls:
|
1 |
long IndexOf(PDFContent content) |
|
Argument |
Description |
|---|---|
| content | The name of the PDFContent object in the PDFPage object. |
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:
|
1 2 3 |
//Get the index of lpdf_page Long ll_index ll_index = lpdf_doc.indexof(lpdf_page) |
See also
PDFDocument objects:
PDFPage objects: