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.SerializableOptions allowing to customize the scan flow- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScanConfiguration.ActionActions displayed on the post processing screenstatic classScanConfiguration.FilterThe post processing filter to apply to the image.static classScanConfiguration.FlashModestatic classScanConfiguration.MultiPageFormatstatic classScanConfiguration.OcrConfigurationstatic classScanConfiguration.OcrOutputFormatThe various formats into which the OCR result can be made available.static classScanConfiguration.PdfPageSizePhysical size of pages in the generated PDF filestatic classScanConfiguration.SourceThe source of the scan flow.
-
Field Summary
Fields Modifier and Type Field Description intbackgroundColorUI background color.ScanConfiguration.FilterdefaultFilterForce the use of a specific post processing filter.ScanConfiguration.FlashModedefaultFlashModeThe default flash mode used when capturing a page.booleanflashButtonHiddenThe visibility of the flash button.intforegroundColorUI foreground color (text and icons).inthighlightColorColor of the document detection overlay.intjpegQualityJPEG quality used to compress captured images.booleanmultiPageMultipage mode.ScanConfiguration.MultiPageFormatmultiPageFormatFormat of the document created with all the captured pages.ScanConfiguration.OcrConfigurationocrConfigurationConfiguration of the text recognition.java.io.FilepdfFontFileCustom font file used during the PDF generation to embed an invisible text layer.intpdfMaxScanDimensionMax scan dimension in pixels when generating the PDF file.ScanConfiguration.PdfPageSizepdfPageSizeDetermine the size of the pages when generating the PDF.java.util.EnumSet<ScanConfiguration.Action>postProcessingActionsSelect which actions are displayed in the post processing screen Default is everything.ScanConfiguration.SourcesourceThe source for the scanned documents (camera, image...).java.io.FilesourceImageThe source image ifsourceisScanConfiguration.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 parametersourceImagemust be provided.
-
sourceImage
public java.io.File sourceImage
The source image ifsourceisScanConfiguration.Source.IMAGE.
-
multiPage
public boolean multiPage
Multipage mode. Only apply whensourceisScanConfiguration.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 withflashButtonHiddenif 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.
-
-