ScanbotSdk class
Properties
-
hashCode
→ int
-
The hash code for this object.
read-onlyinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
applyImageFilter(Page page, ImageFilterType filter)
→ Future<Page>
-
Applies an image
filter
on the final DOCUMENT image of given page
.
-
cleanupStorage()
→ Future<void>
-
Cleanups the storage folders of the Scanbot SDK.
By calling this function all output files generated by the native Scanbot SDKs
as well as by this Plugin will be deleted, including the image files of all scanned
or imported Page objects, all generated PDF files, TIFF files, etc.
-
createPage(Uri originalImageFileUri, bool shouldDetectDocument, {Size? originalImageSizeLimit, Size? documentImageSizeLimit})
→ Future<Page>
-
Creates a page from an image file URI. The given image will be used as ORIGINAL image.
Use the
shouldDetectDocument
flag to specify whether the auto-document detection
should be performed and the (cropped) DOCUMENT image should be created.
originalImageSizeLimit
the maximum size of the original image to be saved. If the original image is larger than the specified size it will be downscaled. By default not specified.
documentImageSizeLimit
the maximum size of the cropped document image to be saved. If the image is larger than the specified size it will be downscaled. If originalImageSizeLimit
is set it also limits the size of the cropped document image. By default not specified.
return Page
-
createPageWithImageBytes(Uint8List imageBytes, bool shouldDetectDocument, {Size? originalImageSizeLimit, Size? documentImageSizeLimit})
→ Future<Page>
-
Creates a page from image bytes. The given image will be used as ORIGINAL image.
Use the
shouldDetectDocument
flag to specify whether the auto-document detection
originalImageSizeLimit
the maximum size of the original image to be saved. If the original image is larger than the specified size it will be downscaled. By default not specified.
documentImageSizeLimit
the maximum size of the cropped document image to be saved. If the image is larger than the specified size it will be downscaled. If originalImageSizeLimit
is set it also limits the size of the cropped document image. By default not specified.
return Page
-
createPdf(List<Page> pages, PdfRenderingOptions options)
→ Future<Uri>
-
Renders a multi-page PDF document from DOCUMENT images of the given
pages
and stores it as a file. For each DOCUMENT image a separate PDF page is generated.
All given pages
must have the DOCUMENT images.
-
createTiff(List<Page> pages, TiffCreationOptions options)
→ Future<Uri>
-
Renders a multi-page TIFF image from DOCUMENT images of the given
pages
and stores it as a file. For each DOCUMENT image a separate TIFF page is generated.
All given pages
must have the DOCUMENT images.
-
cropAndRotatePage(Page page, List<PolygonPoint> polygon, int rotationsCount)
→ Future<Page>
-
Rotates all images of the given
page
by 90 degrees value for rotationsCount
times.
-
deletePage(Page page)
→ Future<void>
-
Removes a page with all its files (ORIGINAL image, DOCUMENT image,
previews/thumbnails, filtered images, etc) from the file storage of the Scanbot SDK.
This method does not remove any exported files (PDF, TIFF, etc) which were
generated based on this page object.
-
detectBarcodesOnImage(Uri file, List<BarcodeFormat> barcodeFormats, {List<BarcodeDocumentFormat> acceptedDocumentFormats = const <BarcodeDocumentFormat>[]})
→ Future<BarcodeScanningResult>
-
Detect barcodes from image file uri
The Barcode Scanner is able to recognize 1D- and 2D-barcodes (QR codes, etc).
barcodeFormats
Format of barcode which need to recognize
acceptedDocumentFormats
Format of document which need to recognize
-
detectBarcodesOnImages(List<Uri> imageFileUris, List<BarcodeFormat> barcodeFormats, {List<BarcodeDocumentFormat> acceptedDocumentFormats = const <BarcodeDocumentFormat>[]})
→ Future<MultiImageBarcodeScanningResult>
-
Detect barcodes from the given images list
-
detectDocument(Page page)
→ Future<Page>
-
Performs auto document detection on the ORIGINAL image of the given
page
and creates (cropped) DOCUMENT image.
The given page
must have the ORIGINAL image.
return Page
with detected polygon.
-
estimateBlurOnPage(Page page)
→ Future<double>
-
Estimate blurriness on a given page.
The document image will be analyzed, if possible. If there is no document image - then the original image will be used.
Returns the value between 0.0 and 1.0. Values closer to 0.0 mean that the image is sharper, values closer to 1.0 - the image is blurred.
-
getFilteredDocumentPreviewUri(Page page, ImageFilterType filter)
→ Future<Uri>
-
Creates a preview image file of the DOCUMENT image by given
filter
.
Does not modify the actual DOCUMENT image of the passed page
.
Use the 'applyImageFilter(page, filter)' method to finally apply an image filter on a page.
-
getLicenseStatus()
→ Future<SdkLicenseStatus>
-
Returns the current license status of the Scanbot SDK.
-
getOcrConfigs()
→ Future<SdkOcrConfig>
-
Returns current OCR configs, like installed OCR languages, etc.
-
initScanbotSdk(ScanbotSdkConfig config)
→ Future<void>
-
Initializes the Scanbot SDK with given
config
s.
The Scanbot SDK must be initialized before using any other API methods.
-
performOcr(List<Page> pages, OcrOptions options)
→ Future<PagesOcrResult>
-
Performs OCR (Optical Character Recognition) on DOCUMENT images of given pages.
-
refreshImageUris(List<Page> pages)
→ Future<List<Page>>
-
Refreshes image file URIs of given pages. For more details please
check out the section 'Persistence of Page Objects' in the documentation.
-
rotatePageClockwise(Page page, int rotationsCount)
→ Future<Page>
-
Rotates all images of the given
page
by 90 degrees value for rotationsCount
times.