Package com.geniusscansdk.scanflow
Class ScanConfiguration
- java.lang.Object
-
- com.geniusscansdk.scanflow.ScanConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class ScanConfiguration extends java.lang.Object implements java.io.Serializable
Options allowing to customize the scan flow- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScanConfiguration.Action
Actions displayed on the post processing screenstatic class
ScanConfiguration.Filter
The post processing filter to apply to the image.static class
ScanConfiguration.FlashMode
static class
ScanConfiguration.MultiPageFormat
static class
ScanConfiguration.OcrConfiguration
static class
ScanConfiguration.OcrOutputFormat
The various formats into which the OCR result can be made available.static class
ScanConfiguration.PdfPageSize
Physical size of pages in the generated PDF filestatic class
ScanConfiguration.Source
The source of the scan flow.
-
Field Summary
Fields Modifier and Type Field Description int
backgroundColor
UI background color.ScanConfiguration.Filter
defaultFilter
Force the use of a specific post processing filter.ScanConfiguration.FlashMode
defaultFlashMode
The default flash mode used when capturing a page.boolean
flashButtonHidden
The visibility of the flash button.int
foregroundColor
UI foreground color (text and icons).int
highlightColor
Color of the document detection overlay.int
jpegQuality
JPEG quality used to compress captured images.boolean
multiPage
Multipage mode.ScanConfiguration.MultiPageFormat
multiPageFormat
Format of the document created with all the captured pages.ScanConfiguration.OcrConfiguration
ocrConfiguration
Configuration of the text recognition.java.io.File
pdfFontFile
Custom font file used during the PDF generation to embed an invisible text layer.int
pdfMaxScanDimension
Max scan dimension in pixels when generating the PDF file.ScanConfiguration.PdfPageSize
pdfPageSize
Determine the size of the pages when generating the PDF.java.util.EnumSet<ScanConfiguration.Action>
postProcessingActions
Select which actions are displayed in the post processing screen Default is everything.ScanConfiguration.Source
source
The source for the scanned documents (camera, image...).java.io.File
sourceImage
The source image ifsource
isScanConfiguration.Source.IMAGE
.
-
Constructor Summary
Constructors Constructor Description ScanConfiguration()
-
-
-
Field Detail
-
source
public ScanConfiguration.Source source
The source for the scanned documents (camera, image...). If the source isScanConfiguration.Source.IMAGE
, the parametersourceImage
must be provided.
-
sourceImage
public java.io.File sourceImage
The source image ifsource
isScanConfiguration.Source.IMAGE
.
-
multiPage
public boolean multiPage
Multipage mode. Only apply whensource
isScanConfiguration.Source.CAMERA
. Defaults to true.
-
defaultFilter
public ScanConfiguration.Filter defaultFilter
Force the use of a specific post processing filter. If not provided, the best filter will be chosen automatically.
-
pdfPageSize
public ScanConfiguration.PdfPageSize pdfPageSize
Determine the size of the pages when generating the PDF. Default isScanConfiguration.PdfPageSize.FIT
-
postProcessingActions
public java.util.EnumSet<ScanConfiguration.Action> postProcessingActions
Select which actions are displayed in the post processing screen Default is everything.
-
flashButtonHidden
public boolean flashButtonHidden
The visibility of the flash button. By default, the flash button is displayed.
-
defaultFlashMode
public ScanConfiguration.FlashMode defaultFlashMode
The default flash mode used when capturing a page. Combine withflashButtonHidden
if you want to only allow a specific flash mode. Default isScanConfiguration.FlashMode.OFF
.
-
backgroundColor
public int backgroundColor
UI background color. Default is black.
-
foregroundColor
public int foregroundColor
UI foreground color (text and icons). Default is white.
-
highlightColor
public int highlightColor
Color of the document detection overlay. Default is blue.
-
jpegQuality
public int jpegQuality
JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality. Default is 60.
-
pdfMaxScanDimension
public int pdfMaxScanDimension
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.
-
multiPageFormat
public ScanConfiguration.MultiPageFormat multiPageFormat
Format of the document created with all the captured pages. When set toScanConfiguration.MultiPageFormat.NONE
, no document will be generated but the individual pages will still be accessible in theScanResult
.
-
pdfFontFile
public java.io.File pdfFontFile
Custom font file used during the PDF generation to embed an invisible text layer. If null, a default font is used, which only supports Latin languages.
-
ocrConfiguration
public ScanConfiguration.OcrConfiguration ocrConfiguration
Configuration of the text recognition. Text recognition will run on a background thread for every captured image. If null, no text recognition will be applied.
-
-