Skip to main content

Scanning barcodes from PDF files

In addition to scanning barcodes from a live camera stream or still images, the Barcode Scanner SDK can scan barcodes from all pages of a PDF file.

Initializing the SDK​

Before using the Scanbot SDK, it must be initialized.

Scanning barcodes​

Call ScanbotSDK.barcode.scanFromPdf() with the path or URI of the PDF file and a scanner configuration.

fun scanFromPdf(pdfFileUri: String, configuration: BarcodeScannerConfiguration): Result<BarcodeScannerResult>
Scan barcode from PDF
loading...

Handling the result​

scanFromPdf() returns a sealed Result type containing a single BarcodeScannerResult with the barcodes detected across all pages of the PDF.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license