render abstract method
Future<PdfPageImage?>
render({
- required double width,
- required double height,
- PdfPageImageFormat format = PdfPageImageFormat.jpeg,
- String? backgroundColor,
- Rect? cropRect,
- int quality = 100,
- @visibleForTesting bool removeTempFile = true,
Render a full image of specified PDF file.
width
, height
specify resolution to render in pixels.
As default PNG uses transparent background. For change it you can set
backgroundColor
property like a hex string ('#FFFFFF')
format
- image type, all types can be seen here PdfPageImageFormat
cropRect
- render only the necessary part of the image
quality
- hint to the JPEG and WebP compression algorithms (0-100)
Implementation
Future<PdfPageImage?> render({
required double width,
required double height,
PdfPageImageFormat format = PdfPageImageFormat.jpeg,
String? backgroundColor,
Rect? cropRect,
int quality = 100,
@visibleForTesting bool removeTempFile = true,
});