fromBytes static method

Future<PdfDocument> fromBytes(
  1. Uint8List bytes, {
  2. String? dylibPath,
})

Loads a PDF document from raw bytes.

Returns a PdfDocument on success.

Throws PdfExtractionException with:

The optional dylibPath overrides the default PDFium dynamic library location. It is intended for testing only.

Implementation

static Future<PdfDocument> fromBytes(
  Uint8List bytes, {
  String? dylibPath,
}) async {
  final impl = await PdfDocumentImpl.fromBytes(bytes, dylibPath: dylibPath);
  return PdfDocument._(impl);
}