genPdfCover method

  1. @override
Future<void> genPdfCover({
  1. required String outDirPath,
  2. required List<String> pdfPathList,
  3. int iconSize = 300,
})
override

Generates cover images for a list of PDF files.

This function processes the given list of PDF file paths and generates their cover images, saving them to the specified output directory.

for linux -> sudo apt install poppler-utils

Parameters:

  • outDirPath (required): The directory path where the generated cover images will be saved.
  • pdfPathList (required): A list of PDF file paths for which covers need to be generated.
  • iconSize (not working! လောလောဆယ် မရသေးပါ) (optional, default: 300): The size (in pixels) of the generated cover images.

Example Usage:

await genPdfCover(
  outDirPath: '/storage/emulated/0/PdfCovers',
  pdfPathList: ['/storage/emulated/0/Download/sample.pdf'],
  iconSize: 400,
);

outDirPath -> /storage/emulated/0/PdfCovers/sample.png

This function is asynchronous and returns a Future that completes when all covers are generated. Deprecated: Use generatePdfCover instead.

Implementation

@override
Future<void> genPdfCover({
  required String outDirPath,
  required List<String> pdfPathList,
  int iconSize = 300,
}) async {
  await ThanPkg.android.thumbnail.genPdfCoverList(
    outDirPath: outDirPath,
    pdfPathList: pdfPathList,
  );
}