open static method

PdfDocument open(
  1. Uint8List bytes, {
  2. String password = '',
  3. List<int>? populatedRanges,
})

Opens a document. For encrypted files password is tried first as the user and then as the owner password (the empty default is what most owner-locked business documents expect); a wrong password throws CosPasswordException.

populatedRanges carries a sparse buffer's populated [start, end) byte pairs when bytes has been copied (including across isolates). Omit it to inherit the map attached to this exact buffer, or treat an unmarked buffer as complete. See CosDocument.populatedRanges.

Implementation

static PdfDocument open(Uint8List bytes,
        {String password = '', List<int>? populatedRanges}) =>
    PdfDocument._(CosDocument.open(bytes,
        password: password, populatedRanges: populatedRanges));