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

Method copyArray

src/document/object-copier.ts:349–357  ·  view source on GitHub ↗

* Copy an array, remapping all reference elements.

(arr: PdfArray)

Source from the content-addressed store, hash-verified

347 * Copy an array, remapping all reference elements.
348 */
349 private copyArray(arr: PdfArray): PdfArray {
350 const items: PdfObject[] = [];
351
352 for (const item of arr) {
353 items.push(this.copyObject(item));
354 }
355
356 return new PdfArray(items);
357 }
358
359 /**
360 * Copy a stream, handling encryption state.

Callers 1

copyObjectMethod · 0.95

Calls 2

copyObjectMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected