GSKScanFlowConfiguration

@interface GSKScanFlowConfiguration : NSObject

Enables configuration of the GSKUIScanner scan flow.

Set the desired configuration on an instance of GSKScanFlowConfiguration and pass it to the initializer of GSKUIScanner to build the desired scan flow.

  • Specifies the source for the scanned documents (eg. the camera, …).

    If source is GSKScanFlowSourceImageURL, you must provide the sourceImageURL parameter.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScanFlowSource source;

    Swift

    var source: GSKScanFlowSource { get set }
  • The image URL if source is GSKScanFlowSourceImageURL.

    Declaration

    Objective-C

    @property (nonatomic, strong, readwrite) NSURL *_Nonnull sourceImageURL;

    Swift

    var sourceImageURL: URL { get set }
  • Multipage mode. Only apply when the source is GSKScanFlowSourceCamera.

    When the multipage mode is active, the user will have the opportunity to snap multiple scans in a row and the output document will contain all these pages.

    When multipage mode is off, the user will only scan a single page. The output document will always contain a single page.

    Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL multiPage;

    Swift

    var multiPage: Bool { get set }
  • Force the use of a specific post processing.

    Defaults to GSKFilterAutomatic.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScanFlowFilterType defaultFilter;

    Swift

    var defaultFilter: GSKScanFlowFilterType { get set }
  • Select which actions are displayed in the post processing screen

    Default is everything.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScanFlowPostProcessingActions postProcessingActions;

    Swift

    var postProcessingActions: GSKScanFlowPostProcessingActions { get set }
  • Determines the size of the pages when generating the PDF.

    Default is GSKScanFlowPDFPageFit

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScanFlowPDFPageSize pdfPageSize;

    Swift

    var pdfPageSize: GSKScanFlowPDFPageSize { get set }
  • Determines the visibility of the flash button

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        BOOL flashButtonHidden;

    Swift

    var flashButtonHidden: Bool { get set }
  • Determines the default flash mode.

    Combine with flashButtonHidden if you want to only allow a specific flash mode.

    Defaults to GSKScanFlowFlashModeAuto

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScanFlowFlashMode defaultFlashMode;

    Swift

    var defaultFlashMode: GSKScanFlowFlashMode { get set }
  • UI background color.

    Default is black.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull backgroundColor;

    Swift

    @NSCopying var backgroundColor: UIColor { get set }
  • UI foreground color (text and icons)

    Default is white.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull foregroundColor;

    Swift

    @NSCopying var foregroundColor: UIColor { get set }
  • UI highlight color (document detection overlay)

    Default is dark blue.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull highlightColor;

    Swift

    @NSCopying var highlightColor: UIColor { get set }
  • UI menu color

    Default is system’s default (eg. blue on iOS)

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull menuColor;

    Swift

    @NSCopying var menuColor: UIColor { get set }
  • JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality.

    Default is 60

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        NSInteger jpegQuality;

    Swift

    var jpegQuality: Int { get set }
  • Max scan dimension in pixels when generating the PDF file. All scans included in the PDF file will be scaled so that both their height and width are smaller than this value, while keeping their aspect ratio.

    Default is 0, which means no scaling is applied.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        NSInteger pdfMaxScanDimension;

    Swift

    var pdfMaxScanDimension: Int { get set }