PdfViewerController.fromDocument constructor

PdfViewerController.fromDocument(
  1. PdfDocument document
)

Create a controller from a PdfDocument.

For documents created programmatically, this calls PdfDocument.save to generate the PDF bytes used for preview.

Implementation

PdfViewerController.fromDocument(this.document) {
  pdfBytes = Uint8List.fromList(document.save());
}