Document Scanner
Scan QR codes and physical documents with PDF417 or MRZ encoded data
PDF417 encoded barcodes are commonly found on physical identity and travel documents, such as driver's licenses, ID cards, boarding passes and secure access cards. MRZ encoded data is typically found on travel documents such as passports, refugee travel permits, and visas.
// SpruceKit Mobile SDK Scanner Types
let qrCodeScanner = QRCodeScanner(
title: "Scan QR Code",
subtitle: "Looking...",
onRead: scanningParams.onRead,
onCancel: onCancel,
// example font values
titleFont: .customFont(font: .inter, style: .bold, size: .h0),
subtitleFont: .customFont(font: .inter, style: .bold, size: .h4),
cancelButtonFont: .customFont(font: .inter, style: .medium, size: .h3),
readerColor: .white
)
let pdf417Scanner = PDF417Scanner(
title: "Scan Barcode",
subtitle: "Looking...",
onRead: scanningParams.onRead,
onCancel: onCancel,
// example font values
titleFont: .customFont(font: .inter, style: .bold, size: .h0),
subtitleFont: .customFont(font: .inter, style: .bold, size: .h4),
cancelButtonFont: .customFont(font: .inter, style: .medium, size: .h3),
readerColor: .white
)
let mrzScanner = MRZScanner(
title: "Scan MRZ",
subtitle: "Looking...",
onRead: scanningParams.onRead,
onCancel: onCancel,
// example font values
titleFont: .customFont(font: .inter, style: .bold, size: .h0),
subtitleFont: .customFont(font: .inter, style: .bold, size: .h4),
cancelButtonFont: .customFont(font: .inter, style: .medium, size: .h3),
readerColor: .white
)
import androidx.compose.ui.graphics.Color
import com.spruceid.mobile.sdk.ui.MRZScanner
import com.spruceid.mobile.sdk.ui.PDF417Scanner
import com.spruceid.mobile.sdk.ui.QRCodeScanner
import com.spruceid.mobilesdkexample.ui.theme.ColorBase150
import com.spruceid.mobilesdkexample.ui.theme.Inter
// SpruceKit Mobile SDK Scanner Types
val qrCodeScanner = QRCodeScanner(
title = "Scan QR Code",
subtitle = "Looking...",
cancelButtonLabel = "Cancel",
onRead = onRead,
isMatch = isMatch,
onCancel = onCancel,
// example font values
fontFamily = Inter,
readerColor = Color.White,
guidesColor = Color.White,
textColor = Color.White,
backgroundOpacity = 0.5f
)
val pdf417Scanner = PDF417Scanner(
title = "Scan QR Code",
subtitle = "Looking...",
cancelButtonLabel = "Cancel",
onRead = onRead,
isMatch = isMatch,
onCancel = onCancel,
// example font values
fontFamily = Inter,
readerColor = Color.White,
guidesColor = Color.White,
textColor = Color.White,
backgroundOpacity = 0.5f
)
val mrzScanner = MRZScanner(
title = "Scan QR Code",
subtitle = "Looking...",
cancelButtonLabel = "Cancel",
onRead = onRead,
isMatch = isMatch,
onCancel = onCancel,
// example font values
fontFamily = Inter,
readerColor = Color.White,
guidesColor = Color.White,
textColor = Color.White,
backgroundOpacity = 0.5f
)
Last updated
Was this helpful?