Constructor
#
new ScanResult(images, scanFormatType, tiffFile, pdfFile, imageType)
Parameters:
Name |
Type |
Description |
images |
Array
|
An array of base64 encoded scanned page images. |
scanFormatType |
String
|
The type of the scan. Can be jpeg, bmp, png, pdf or tiff. |
tiffFile |
String
|
The base64 encoded tiff file. Only available if scanFormatType is tiff. |
pdfFile |
String
|
The base64 encoded pdf file. Only available if scanFormatType is pdf. |
imageType |
String
|
The type of the single image. Can be jpeg, bmp or png. |
Members
#
imageType :String
The type of the single image.
For scanFormatType = 'tiff','pdf' or 'jpeg' it is jpeg.
For 'bmp' it is 'bmp'.
For 'png' it is 'png'.
#
images :Array
An array of base64 encoded scanned page images.
#
pdfFile :String
The base64 encoded pdf file. Only available if scanFormatType is pdf.
The scan format type. Can be jpeg, bmp, png, pdf or tiff.
#
tiffFile :String
The base64 encoded tiff file. Only available if scanFormatType is tiff.
Methods
#
getImageDataAsUint8Array(pageNumber) → {Uint8Array}
Get image as Uint8Array for selected page number.
Parameters:
Name |
Type |
Description |
pageNumber |
Number
|
The page number to get the image data from. |
#
getImageDataSrc(pageNumber) → {String}
Get image data source URL for selected page number.
Useful for displaying the image in an canvas or img element.
Parameters:
Name |
Type |
Description |
pageNumber |
Number
|
The page number to get the image data from. |
Returns:
Data source URL with the base64 encoded image data.
-
Type
-
String
#
pageCount() → {Number}
Returns:
The number of pages in the scan result.
-
Type
-
Number