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

Method getObject

src/document/object-registry.ts:157–159  ·  view source on GitHub ↗

* Get an object by reference (sync version). * * Only returns objects already in the registry. * Use `resolve()` to fetch objects via the resolver. * * @param ref - The reference to look up * @returns The object, or null if not found

(ref: PdfRef)

Source from the content-addressed store, hash-verified

155 * @returns The object, or null if not found
156 */
157 getObject(ref: PdfRef): PdfObject | null {
158 return this.loaded.get(ref) ?? this.newObjects.get(ref) ?? null;
159 }
160
161 /**
162 * Resolve an object by reference.

Callers 2

resolveMethod · 0.95
createMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected