extract

abstract fun extract(pdfFile: File, scaling: Float = DEFAULT_SCALING, bitmapConfig: Bitmap.Config = Bitmap.Config.ARGB_8888, cancelCallback: LongOperationCancelCallback? = null, progressCallback: ProgressCallback? = null, processingCallback: PdfImagesExtractor.PdfImageProcessingCallback? = null): Result<List<String>>

Converts PDF document to separate image files as pages with given options. If the encryption of sdk is enabled all pages WILL be encrypted.

Return

Result containing list of imported page ids, or failure if operation fails

Parameters

pdfFile

input pdf document

scaling

size of the image modifier. 2 by default

bitmapConfig

bitmap config to use. ARGB_8888 by default

cancelCallback

callback that can cancel the operation during the extraction of pages

progressCallback

callback that can get the number of pages already processed during the extraction of pages

processingCallback

optional callback that can process each extracted image before storing as page