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
- 对象编号可用于在 XRef 表中直接定位该页面的字节偏移量,适用于底层文档分析
- 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