Skip to main content

Function: extractPages()

function extractPages(data, pageIndexes): Uint8Array;

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.