Mobile Document Scanner API Reference / ScannerSettings
Interface: ScannerSettings
Defined in: src/settings/settings.ts:31
The settings of a DocumentScanner. Every setting is optional.
Properties
container?
optionalcontainer?:string|HTMLElement
Defined in: src/settings/settings.ts:66
The element that the document scanner shows in, or a selector for one. The capture screen always shows here. The edit screen also shows here, unless EditSettings.container names another element. For the rectify screen, see RectifySettings.container. In document.body, the .mds-scanner element of the document scanner covers the browser window.
The stacking order is stable, and no minor release changes it. The element that covers the browser window is at z-index 2000000000. The dialogs open in the browser's top layer, above every z-index, and at z-index 2000000001 where the browser cannot open them modally. An element of the page with a z-index of 2000000002 or more shows above the document scanner, and one with less than 2000000000 stays below it.
Default Value
document.body
engines?
optionalengines?:EngineSettings
Defined in: src/settings/settings.ts:48
Engine modules that the host application already imported. With them, the document scanner imports no engine of its own. Use this setting when the page would otherwise load two copies of an engine. Also use it when the page has no bundler for the package names that the document scanner imports.
license?
optionallicense?:string
Defined in: src/settings/settings.ts:37
The license key of both engines. With an empty key, no key, or the placeholder key "YOUR_LICENSE_KEY_HERE" of the samples, the engines use the public trial license.
maxPages?
optionalmaxPages?:number|"unlimited"
Defined in: src/settings/settings.ts:93
The most pages that the document may hold: a whole number of at least 1, or "unlimited". The count includes the pages that an earlier finish() kept.
When a new page fills the document, the edit screen opens. If the edit phase is off, the session ends with the pages. If the document is full when a session starts, the edit screen opens. If the edit phase is off, the capture screen opens instead, with a notice that no page can be added. The capture screen also shows that notice if the edit phase is off and the session cannot finish after the last page.
Default Value
"unlimited"
output?
optionaloutput?:OutputSettings
Defined in: src/settings/settings.ts:77
The encoded document that the result carries, such as one PDF of every page. Without it, the result carries only its pages, as SuccessfulScan.pages.
phases?
optionalphases?:PhaseSettings
Defined in: src/settings/settings.ts:96
The settings of each phase.
resources?
optionalresources?:ResourceSettings
Defined in: src/settings/settings.ts:40
The locations of the runtime files of the engines.
strings?
optionalstrings?:StringSettings
Defined in: src/settings/settings.ts:71
The text of the screens and the dialogs, in place of the built-in English text.
theme?
optionaltheme?:ThemeTokens
Defined in: src/settings/settings.ts:69
The colors of the screens.