Skip to content

zeropdf v1.3.0


zeropdf / extractPages

Function: extractPages()

ts
function extractPages(data, pageIndexes): Uint8Array;

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

Creates a new PDF containing only the selected pages from an existing document.

Parameters

ParameterTypeDescription
dataBinaryDataThe source PDF bytes.
pageIndexesreadonly number[]Zero-based page indexes to copy into the new document.

Returns

Uint8Array

The transferred PDF bytes.

Released under the ISC license.