Skip to main content

Function: appendPages()

function appendPages(
target,
source,
pageIndexes?): Uint8Array;

Appends selected pages from one PDF to the end of another PDF and returns the updated document bytes.

Parameters​

ParameterTypeDescription
targetBinaryDataThe PDF bytes that receive appended pages.
sourceBinaryDataThe PDF bytes to copy pages from.
pageIndexes?readonly number[]Optional zero-based source page indexes to append.

Returns​

Uint8Array

The PDF bytes containing the target pages followed by appended source pages.