createImageFromPDF method

Future<List<String>?> createImageFromPDF({
  1. required String inputPath,
  2. required String outputPath,
  3. ImageFromPdfConfig config = const ImageFromPdfConfig(),
})

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.
  • config: A configuration object that specifies how to process the images.
    • rescale: The scaling configuration for the images (default is the original image).
    • compression: The image compression level for the images, affecting file size, quality and clarity (default is ImageCompression.none).
    • createOneImage: Indicates whether to create a single image 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,
  ImageFromPdfConfig config = const ImageFromPdfConfig(),
}) {
  throw UnimplementedError('createImageFromPDF() has not been implemented.');
}