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