render abstract method

Future<PdfPageImage?> render({
  1. required double width,
  2. required double height,
  3. PdfPageImageFormat format = PdfPageImageFormat.jpeg,
  4. String? backgroundColor,
  5. Rect? cropRect,
  6. int quality = 100,
  7. @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,
});