Skip to main content

Extract Images from PDF | Cordova Barcode Scanner

This API function allows you to extract JPEG or PNG (Android only) images from a PDF file.

ScanbotBarcodeSDK.extractImagesFromPdf(successCallback, errorCallback, args)


* The location of the PDF file
pdfFilePath: string;
* The quality that each extracted image should have.
* This tweaks the compression, affecting the final image file size.
* (100: maximum quality, 0: minimum quality)
* Default value is 90
quality?: number;
* Integer scaling factor applied to the PDF media box frame while extracting.
* Affects the output image quality.
* In most cases the recommended value is 2 or higher.
* Default value is 2.
scaling?: number;
* Compress format used for extracted images. Android only.
* Default value is JPEG.
compressFormat?: CompressFormat;


Returns an result with the following properties:

  • result.status - The status of the operation (OK or CANCELED)
  • data? - Optional List containing the file URLs for the extracted images, or undefined if the extraction failed

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?