THotPDF.GetLoadedPageObjectNumber Method
Returns the PDF indirect object number corresponding to the specified page in the loaded PDF document
Declaration
function GetLoadedPageObjectNumber(PageIndex: Integer): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
Return value
Returns the indirect object number (positive integer) of the page in the XRef; returns 0 if the index is out of bounds
Usage notes
- The object number lets you locate the page's byte offset directly in the XRef table, which suits low-level document analysis
- Object numbers and generation indices (PageIndex) do not have a linear relationship; do not assume numbers are contiguous
- Combined with GetLoadedMaxObjectNumber, this can verify whether the object number is within the document range