render static method
Future<PdfPageImage?>
render(
- String filePath,
- int pageNumber, {
- int? x,
- int? y,
- int? width,
- int? height,
- double? fullWidth,
- double? fullHeight,
override
Implementation
static Future<PdfPageImage?> render(String filePath, int pageNumber,
{ int? x, int? y, int? width, int? height,
double? fullWidth, double? fullHeight}) async {
final doc = await PdfDocument.openFile(filePath);
if (doc == null) return null;
final page = await (doc.getPage(pageNumber) as FutureOr<PdfPage>);
final image = await page.render(
x: x, y: y,
width: width,
height: height,
fullWidth: fullWidth, fullHeight: fullHeight);
doc.dispose();
return image;
}