raster static method
Convert a PDF to a list of images.
await for (final page in Printing.raster(content)) {
final image = page.asImage();
}
This is not supported on all platforms. Check the result of info to find at runtime if this feature is available or not.
Implementation
static Stream<PdfRaster> raster(
Uint8List document, {
List<int>? pages,
double dpi = PdfPageFormat.inch,
}) {
assert(dpi > 0);
return PrintingPlatform.instance.raster(document, pages, dpi);
}