modern-pdf-lib / removePages
Function: removePages()
removePages(
doc,indices):void
Defined in: src/core/pageManipulation.ts:360
Remove multiple pages at once, given their zero-based indices.
Indices are processed in descending order to avoid shifting issues.
Parameters
doc
The PdfDocument to modify.
indices
number[]
Array of zero-based page indices to remove.
Returns
void
Throws
RangeError if any index is out of bounds.