MCPcopy Create free account
hub / github.com/LibPDF-js/core / getObjectNumber

Method getObjectNumber

src/parser/object-stream-parser.ts:215–221  ·  view source on GitHub ↗

* Get the object number at a given index. * * @param index - 0-based index from XRef entry's indexInStream * @returns Object number, or null if index is out of range

(index: number)

Source from the content-addressed store, hash-verified

213 * @returns Object number, or null if index is out of range
214 */
215 getObjectNumber(index: number): number | null {
216 if (!this.index || index < 0 || index >= this.index.length) {
217 return null;
218 }
219
220 return this.index[index].objNum;
221 }
222
223 /**
224 * Get the number of objects in this stream.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected