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 (_documentRepo[documentID]!.getPage(pageNumber)).toDart;
PdfJsViewport viewport = page.getViewport(_settings);
return _renderPageTile(page, viewport, scale, x, y, width, height);
}
return Uint8List.fromList(<int>[0]);
}