createImageFromPDF method

Future<List<String>?> createImageFromPDF({
  1. required String inputPath,
  2. required String outputPath,
  3. int? maxWidth,
  4. int? maxHeight,
  5. bool? createOneImage,
})

Creates images from a PDF file.

Platform-specific implementations should override this method to extract images from the provided PDF and return the resulting image file paths.

Parameters:

  • inputPath: The file path of the PDF from which images will be extracted.
  • outputPath: The directory path where the images should be saved.
  • maxWidth: The maximum width of each extracted image (default is 360).
  • maxHeight: The maximum height of each extracted image (default is 360).
  • createOneImage: Whether to create a single image from all PDF pages or separate images for each page (default is true).

Returns:

  • A Future<List<String>?> representing a list of image file paths. By default, this throws an UnimplementedError.

Implementation

Future<List<String>?> createImageFromPDF({
  required String inputPath,
  required String outputPath,
  int? maxWidth,
  int? maxHeight,
  bool? createOneImage,
}) {
  throw UnimplementedError('createImageFromPDF() has not been implemented.');
}