PdfDocument.parseFromBytes constructor

PdfDocument.parseFromBytes(
  1. Uint8List pdfBytes, {
  2. bool enableCache = true,
  3. int cacheBlockSize = 256 * 1024,
  4. int cacheMaxBlocks = 32,
  5. bool allowRepair = false,
})

Parses a PDF from in-memory bytes.

Implementation

factory PdfDocument.parseFromBytes(
  Uint8List pdfBytes, {
  bool enableCache = true,
  int cacheBlockSize = 256 * 1024,
  int cacheMaxBlocks = 32,
  bool allowRepair = false,
}) {
  final parser = PdfDocumentParser(
    pdfBytes,
    enableCache: enableCache,
    cacheBlockSize: cacheBlockSize,
    cacheMaxBlocks: cacheMaxBlocks,
    allowRepair: allowRepair,
  );
  return PdfDocument.load(parser);
}