Skip to content

modern-pdf-lib


modern-pdf-lib / copyPages

Function: copyPages()

copyPages(sourceDoc, targetDoc, indices): PdfPage[]

Defined in: src/core/documentMerge.ts:351

Copy pages from a source document to a target document.

Parameters

sourceDoc

PdfDocument

The source document.

targetDoc

PdfDocument

The target document.

indices

number[]

Zero-based page indices to copy from the source.

Returns

PdfPage[]

Array of new PdfPage objects added to the target.

Released under the MIT License.