ScanbotSdk class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
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
-
analyzeQualityOfDocument(Page page, {Size? analyzerImageSizeLimit})
→ Future<DocumentQualityResult>
-
Analyze a document and calculate its text quality
page
the page to analyze
analyzerImageSizeLimit
the maximum size of the document image to run detection on. If the image is larger than the specified size it will be downscaled.
-
applyImageFilter(Page page, ImageFilterType filter)
→ Future<Page>
-
Applies an image
filter
on the final DOCUMENT image of the given page
.
-
cleanupStorage()
→ Future<void>
-
Cleanups the storage folders of the Scanbot SDK.
-
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 the ORIGINAL image.
Use the shouldDetectDocument
flag to specify whether the auto-document detection
should be performed and the (cropped) DOCUMENT image should be created.
-
createPageWithImageBytes(Uint8List imageBytes, bool shouldDetectDocument, {Size? originalImageSizeLimit, Size? documentImageSizeLimit})
→ Future<Page>
-
Creates a page from image bytes. The given image will be used as the 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.
-
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 contain 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 contain DOCUMENT images.
-
cropAndRotatePage(Page page, List<PolygonPoint> polygon, int rotationsCount)
→ Future<Page>
-
Crops and rotates all images of the given
page
by 90 degrees 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.
-
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 a (cropped) DOCUMENT image.
The given page
must contain the ORIGINAL image.
Returns Page
with the detected polygon.
-
getFilteredDocumentPreviewUri(Page page, ImageFilterType filter)
→ Future<Uri>
-
Creates a preview image file of the DOCUMENT image using the 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 the 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 provided
pages
.
-
refreshImageUris(List<Page> pages)
→ Future<List<Page>>
-
Refreshes image file URIs of provided
pages
.
For more details, please
check 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 for rotationsCount
times.