DSOptions

@objc
public class DSOptions : NSObject

A configuration object that indicates how the document scan should behave

Discussion

DSOptions store configuration options for a specific types of document scans. These configurations can very by scan type. For example an ID1 configuration may contain different configuration options than a passport configuration

The type of options passed to the DSHandler determine how and what the scan will try to detect.

  • Flash capture options for a document scan.

    See more

    Declaration

    Swift

    @objc
    public enum FlashCapture : Int
  • Sets the flash capture option for a document scan. Defaults to Front

    Declaration

    Swift

    @objc
    public var enableFlashCapture: FlashCapture
  • The target DPI for the captured image. A valid DPI range is 300 to the value specified in maximumDPI. Defaults to 460 DPI.

    If the target DPI is given as less than 300, then the targetDPI value will clamp to 300. If the target DPI is greater than maximumDPI, then the targetDPI value will clamp to maximumDPI.

    Declaration

    Swift

    @objc
    public var targetDPI: Int { get set }
  • The maximum DPI allowed for the captured image. The valid range is 600 to 900 DPI. Defaults to 900 DPI.

    The SDK will automatically increase the DPI of the image if it cannot read the barcode at the targetDPI setting. If the maximum DPI is given as less than 600, then the maximumDPI value will clamp to 600. If the minimum DPI is greater than 900, then the maximumDPI value will default to 900. If the targetDPI value is greater than a newly set maximumDPI value, then the targetDPI will equal the new maximumDPI value.

    Declaration

    Swift

    @objc
    public var maximumDPI: Int { get set }
  • The compression quality of the image data returned. Expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). Defaults to 0.30 Discussion: If the value is less than 0.0, then the value will be set to 0.0. If the value is greater than 1.0 the value will be set to 1.0

    Declaration

    Swift

    @objc
    public var imageCompressionQuality: CGFloat { get set }
  • Does nothing, don’t use! * Deprecated * There is no replacement.

    Declaration

    Swift

    @available(*, deprecated, message: "This property will be removed soon")
    @objc
    public var enableRectification: Bool
  • Shows an image review screen after the user scans an image of the document. Defaults to false

    Declaration

    Swift

    @objc
    public var showReviewScreen: Bool
  • Undocumented

    Declaration

    Swift

    @objc
    public required override init()