split static method

List<Uint8List> split(
  1. Uint8List bytes,
  2. List<PdfPageRange> ranges, {
  3. String password = '',
})

Returns one PDF per zero-based, inclusive range in ranges.

An empty list or reversed range throws ArgumentError; a page outside the document throws RangeError. Opening errors propagate to the caller.

Implementation

static List<Uint8List> split(
  Uint8List bytes,
  List<PdfPageRange> ranges, {
  String password = '',
}) =>
    PdfDocument.open(bytes, password: password).extractPageRanges(ranges);