Skip to main content

Cordova is deprecated

This platform is deprecated and will not receive further updates or new features. Existing customers may continue to use and renew their license, while new projects should use Capacitor, which is the recommended alternative.

View Capacitor documentation

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)

Arguments

 /**
* 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

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 a free trial license to test the Scanbot SDK thoroughly.

Get free trial license