scanbot-web-sdk 5.0.0-alpha.2 → 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ export default class DocumentScannerView extends ScannerView<DocumentScannerProp
24
24
  get defaultAction(): ShutterButtonAction;
25
25
  get enabled(): boolean;
26
26
  get configuration(): DocumentScannerConfiguration;
27
- get autoCaptureDelay(): number;
27
+ get autoCaptureSensitivity(): number;
28
28
  /**
29
29
  * Public API functions
30
30
  */
@@ -43,6 +43,7 @@ export default class DocumentScannerView extends ScannerView<DocumentScannerProp
43
43
  detect(): Promise<void>;
44
44
  getStatusString(detectionResult: any): string;
45
45
  detectInWebWorker(): Promise<any>;
46
+ preventAutoCapture?: boolean;
46
47
  handleAutoCapture(statusOk: boolean, polygon?: Polygon): Promise<void>;
47
48
  updateButton(action: ShutterButtonAction): void;
48
49
  render(): JSX.Element;
@@ -74,6 +74,14 @@ export declare class DocumentScannerConfiguration extends ScannerConfiguration {
74
74
  * a value of 0.0 delays the automatic by 3 seconds. The default value is 0.66 (2 seconds)
75
75
  */
76
76
  autoCaptureSensitivity?: number;
77
+ /**
78
+ * Delay in milliseconds before the auto-capture is triggered after 'onDocumentDetected' has been called.
79
+ * This delay is used to prevent too many documents being captured in a row.
80
+ * In essence, autoCaptureSensitivity controls the speed of autocapture during the detection phase,
81
+ * while autoCaptureDelay controls the speed of autocapture after the detection phase.
82
+ * Default is 1000ms.
83
+ */
84
+ autoCaptureDelay?: number;
77
85
  /**
78
86
  * Determines whether to ignore the OK_BUT_BAD_ASPECT_RATIO detection status.
79
87
  * By default BadAspectRatio is not ignored.
@@ -52,12 +52,16 @@ export declare type PageFit = "FIT_IN" | "FILL_IN" | "STRETCH" | "NONE";
52
52
  * resulting PDF will be smaller in size.
53
53
  */
54
54
  export interface PdfGenerationOptions {
55
- /** Physical size of the page. If CUSTOM, the page size will be set as the image size at given dpi. */
55
+ /** Physical size of the page. If CUSTOM, the page size will be set as the image size at given dpi.
56
+ * Default value: A4
57
+ * */
56
58
  standardPaperSize?: PageSize;
59
+ /** Default value: PORTRAIT */
57
60
  pageDirection?: PageDirection;
58
61
  /** How to fit the image into the page. Only used if `pageSize` is not `CUSTOM`.
59
62
  * The image can either be stretched to fill the page, in one of three ways, or
60
63
  * centered on the page without stretching.
64
+ * Default value: FIT_IN
61
65
  */
62
66
  pageFit?: PageFit;
63
67
  /** The `dpi` parameter has two different meanings depending on the value of `pageSize` and
@@ -66,17 +70,23 @@ export interface PdfGenerationOptions {
66
70
  * raw) to the PDF. Otherwise, if `resample` is true, then the image is downscaled if necessary
67
71
  * (if the image after being fit to the page has a higher calculated DPI than `dpi`) to match
68
72
  * `dpi` before adding it to the PDF. Otherwise, the setting is ignored and the calculated
69
- * image DPI is used instead. */
73
+ * image DPI is used instead.
74
+ * Default value: 72
75
+ */
70
76
  dpi?: number;
71
77
  /** JPEG quality for images.
72
78
  * Applies if an image is added as a cv::Mat and therefore needs to be encoded.
73
79
  * Also applies if `resample` is true and the image being added needs to be downscaled.
74
80
  * Otherwise, when adding JPEG files to the PDF, the files are copied directly into the PDF and
75
- * not re-encoded, which is many times faster and also preserves the quality of the original. */
81
+ * not re-encoded, which is many times faster and also preserves the quality of the original.
82
+ * Default value: 80
83
+ */
76
84
  jpegQuality?: number;
77
85
  /** false: always geometrically rescale the image to fit the page if necessary. Fast.
78
86
  * true: downscale the bitmap to match the `dpi` setting before adding it to the PDF if
79
- * the calculated image DPI after stretching is greater than `dpi`. Slower. */
87
+ * the calculated image DPI after stretching is greater than `dpi`. Slower.
88
+ * Default value: false
89
+ */
80
90
  resample?: boolean;
81
91
  }
82
92
  export default class PdfGenerator {
@@ -6,7 +6,7 @@ import { OutlineStyleConfiguration } from "../model/configuration/document-scann
6
6
  export interface DocumentOutlineProps {
7
7
  style?: OutlineStyleConfiguration;
8
8
  action?: ShutterButtonAction;
9
- autoCaptureDelay?: number;
9
+ autoCaptureSensitivity?: number;
10
10
  }
11
11
  export declare class DocumentOutline extends React.Component<DocumentOutlineProps, any> {
12
12
  hintLabelClassName: string;
@@ -5,7 +5,7 @@ import { ShutterButtonAction } from "../shutter-button";
5
5
  import { CaptureAnimationStyleConfiguration, OutlinePolygonStyleConfiguration } from "../../model/configuration/document-scanner-configuration";
6
6
  export declare class AnimatedDocumentPolygonProps {
7
7
  action?: ShutterButtonAction;
8
- autoCaptureDelay?: number;
8
+ autoCaptureSensitivity?: number;
9
9
  style?: any;
10
10
  isOk?: boolean;
11
11
  isVisible?: boolean;
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # Web Scan SDK
1
+ # Scanbot Web SDK
2
+
3
+ ## JavaScript Document Scanner, Barcode Scanner, and Data Capture SDK for the Web
2
4
 
3
- ## Add enterprise-grade barcode-, MRZ-, and document scanning to your app in no time
4
5
  The Scanbot Web SDK makes it possible to add barcode-, MRZ-, as well as
5
6
  [document scanning to your website or to your web application](https://scanbot.io/products/document-scanning/web-document-scanner/).
6
7
 
7
- The Scanbot Web SDK is based on WebAssembly and the HTML Media Capture API and can be used on iOS
8
- (Safari; Chrome and Firefox as of iOS 14.4.2) and Android (Chrome, Firefox, Edge, Samsung Internet).
9
-
8
+ The Scanbot Web SDK is based on WebAssembly and the HTML Media Capture API and can be used on iOS 14.5+
9
+ (Safari, Chrome, Firefox, Edge) and Android (Chrome, Firefox, Edge, Samsung Internet).
10
10
 
11
- # Barcode Scanner for the Web
11
+ ## Barcode Scanner for the Web
12
12
  The [Web Barcode Scanner](https://scanbot.io/products/barcode-software/web-barcode-scanner/) allows you to easily
13
13
  implement barcode scanning. Determine the barcode type, the data contained in it, and data from a potentially
14
14
  binary result (rawBytes).
@@ -35,8 +35,7 @@ like [Code 39](https://scanbot.io/products/barcode-software/1d-barcode-scanner/c
35
35
 
36
36
  Check out our [live demo](https://scanbot.io/trial/demo-web/barcode-demo/).
37
37
 
38
-
39
- # Document Scanner for the Web
38
+ ## Document Scanner for the Web
40
39
  The [Web Document Scanner](https://scanbot.io/products/document-scanning/web-document-scanner/) allows you to easily
41
40
  implement real-time document detection with user guidance, auto-snapping, auto-cropping, and perspective correction.
42
41
 
@@ -45,15 +44,13 @@ as well as the option to save detected documents as PDF or TIFF.
45
44
 
46
45
  Check out our [live demo](https://scanbot.io/trial/demo-web/).
47
46
 
48
-
49
- # MRZ Scanner for the Web
47
+ ## MRZ Scanner for the Web
50
48
  With the Scanbot [MRZ Scanner SDK for the web](https://scanbot.io/products/data-capture/mrz-software/web-mrz-scanner/),
51
49
  you can extract personal data from machine-readable zones (MRZ), for example on ID cards.
52
50
 
53
51
  Check out our [live demo](https://scanbot.io/trial/demo-web/).
54
52
 
55
-
56
- # Documentation & Example App
53
+ ## Documentation & Example App
57
54
  To integrate this plugin into your application please follow the steps in our
58
55
  [documentation](https://docs.scanbot.io/document-scanner-sdk/web/introduction/) and check out our Angular, React and
59
56
  plain JS [example apps](https://github.com/doo/scanbot-sdk-example-web).
@@ -62,8 +59,7 @@ This library is meant to be used natively in a web browser, if you are instead l
62
59
  please go here: [Document Scanner](https://www.npmjs.com/package/cordova-plugin-scanbot-sdk) /
63
60
  [Barcode Scanner](https://www.npmjs.com/package/cordova-plugin-scanbot-barcode-scanner).
64
61
 
65
-
66
- # Changelog
62
+ ## Changelog
67
63
  For a detailed list of the changes included in each version, please see the
68
64
  [changelog](https://docs.scanbot.io/document-scanner-sdk/web/changelog/).
69
65
 
@@ -75,4 +71,4 @@ Please kindly note that a trial license can only be used in a **development and
75
71
 
76
72
 
77
73
  ## Free Developer Support
78
- We provide free "no-strings-attached" developer support for the implementation & testing of the Scanbot SDK. If you encounter technical issues with integrating the Scanbot SDK or need advice on choosing the appropriate framework or features, please visit our [Support Page](https://docs.scanbot.io/support/).
74
+ We provide free "no-strings-attached" developer support for the implementation & testing of the Scanbot SDK. If you encounter technical issues with integrating the Scanbot SDK or need advice on choosing the appropriate framework or features, please visit our [Support Page](https://docs.scanbot.io/support/).