Package io.scanbot.sdk.pdf
Class PdfiumPdfImagesExtractor
-
- All Implemented Interfaces:
-
io.scanbot.sdk.pdf.PdfImagesExtractor
public class PdfiumPdfImagesExtractor implements PdfImagesExtractor
Allows extract image files from the imported pdf files. Based on Pdfium library.
-
-
Field Summary
Fields Modifier and Type Field Description private final FileIOProcessor
fileIOProcessor
private final Context
context
-
Constructor Summary
Constructors Constructor Description PdfiumPdfImagesExtractor(FileIOProcessor fileIOProcessor, Context context)
-
Method Summary
Modifier and Type Method Description final FileIOProcessor
getFileIOProcessor()
final Context
getContext()
List<Uri>
imageUrlsFromPdf(File pdfFile, File outputDir, String prefix, Bitmap.CompressFormat compression, Integer quality, Float scaling, Bitmap.Config bitmapConfig, LongOperationCancelCallback cancelCallback, ProgressCallback progressCallback)
Converts pdf document to separate image files with given options. -
-
Constructor Detail
-
PdfiumPdfImagesExtractor
PdfiumPdfImagesExtractor(FileIOProcessor fileIOProcessor, Context context)
- Parameters:
fileIOProcessor
- for handling sdk file encryption process.
-
-
Method Detail
-
getFileIOProcessor
final FileIOProcessor getFileIOProcessor()
-
getContext
final Context getContext()
-
imageUrlsFromPdf
List<Uri> imageUrlsFromPdf(File pdfFile, File outputDir, String prefix, Bitmap.CompressFormat compression, Integer quality, Float scaling, Bitmap.Config bitmapConfig, LongOperationCancelCallback cancelCallback, ProgressCallback progressCallback)
Converts pdf document to separate image files with given options. If the encryption of sdk is enabled all images WILL be encrypted.
- Parameters:
pdfFile
- input pdf documentoutputDir
- directory, where the output files will be storedprefix
- prefix for output image files, naming will be <prefix>_<page_number>.<compress_format>compression
- bitmap compress format to use.quality
- compression quality.scaling
- size of the image modifier.bitmapConfig
- bitmap config to use.cancelCallback
- callback that can cancel the operation during the extraction of pagesprogressCallback
- callback that can get the number of pages already processed during the extraction of pages
-
-
-
-