getImage method
Gets the image's bytes information of the specified page.
Implementation
@override
Future<Uint8List> getImage(
int pageNumber, double scale, String documentID) async {
if (_documentRepo[documentID] != null) {
PdfJsPage page = await promiseToFuture<PdfJsPage>(
_documentRepo[documentID]!.getPage(pageNumber));
PdfJsViewport viewport = page.getViewport(_settings);
return renderPage(page, viewport, scale, documentID);
}
return Uint8List.fromList(<int>[0]);
}