Skip to content

zeropdf v1.3.0


zeropdf / appendPages

Function: appendPages()

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

Defined in: src/page-transfer.ts:114

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.

Released under the ISC license.