Interface IScanbotOperations
- Namespace
- ScanbotSDK.MAUI
- Assembly
- DocumentSDK.MAUI.dll
Async API wrapper interface for SDK functions.
Properties
DefaultOcrConfig
Returns information about the installed OCR languages.
Property Value
IsEncryptionEnabled
Returns whether the encryption was enabled.
Property Value
- bool
true
if the encryption was set during initialisation of the SDK; otherwise,false
.
IsLicenseValid
Returns whether the installed license is valid. If the SDK was initialized without a license, trial mode will be enabled and the license will remain valid for about a minute.
Property Value
- bool
true
if the license is valid; otherwise,false
.
LicenseInfo
Returns the License info.
Property Value
Methods
ApplyImageFilterAsync(PlatformImage, ParametricFilter, ResultOptions)
Applies the filters to an ImageSource asynchronously.
[Obsolete("This method may be moved to ImageProcessor or a related extension class in the future")]
Task<PlatformImage> ApplyImageFilterAsync(PlatformImage image, ParametricFilter filter, ResultOptions resultOptions = null)
Parameters
image
PlatformImage Image.
filter
ParametricFilter Filters.
resultOptions
ResultOptions Result options that specify the result image's storage details.
Returns
- Task<Platform
Image > The image with the applied filters.
CleanUp()
Removes all internally generated files from methods of this interface, as well as all page image files.
Returns
CreatePdfAsync(IEnumerable<FileImageSource>, PDFConfiguration)
Creates a PDF file out of one or more FileImageSource objects. All images must be instances of FileImageSource. Those are images created with ImageSource.FromStream and images stored as files by the SDK (which is the default behavior, corresponds to ResultStorage.File). The generated file will be deleted when calling CleanUp. If you want to keep the file, move it to a folder that you have control over.
Parameters
files
IEnumerable<FileImage >Source A collection of FileImageSource instances.
configuration
PDFConfigurationContains the PDF configurations and PDF metadata.
Returns
CreateSandwichPdfAsync(IEnumerable<FileImageSource>, PDFConfiguration, OcrConfig)
Performs OCR and Creates a PDF file out of one or more FileImageSource objects. All images must be instances of FileImageSource. Those are images created with ImageSource.FromStream and images stored as files by the SDK (which is the default behavior, corresponds to ResultStorage.File). The generated file will be deleted when calling CleanUp. If you want to keep the file, move it to a folder that you have control over.
Task<Uri> CreateSandwichPdfAsync(IEnumerable<FileImageSource> sources, PDFConfiguration pdfConfig, OcrConfig ocrConfig)
Parameters
sources
IEnumerable<FileImage >Source Images containing text.
pdfConfig
PDFConfigurationContains the PDF configurations and PDF metadata.
ocrConfig
OcrConfig The OCR configuration. If the value is not set, The default value used will be [OCRMode.ScanbotOCR] which is the new ML based configuration. The langauges string is mandatory only if we use the old [Tessarat] based engine.
Returns
CreateScannedPageAsync(PlatformImage)
Creates a ScannedPage object from an ImageSource. Used when you need to pass an ImageSource to CroppingPage
[Obsolete("This makes use of the legacy page storage feature. Prefer to use the new ScannedDocument and ScannedPage classes and related APIs.")]
Task<IScannedPage> CreateScannedPageAsync(PlatformImage source)
Parameters
source
PlatformImage Image to use as original
Returns
- Task<IScanned
Page > The scanned page.
DetectDocumentQualityAsync(PlatformImage, DocumentQualityAnalyzerConfiguration)
Detects the quality of the document image.
Task<DocumentQuality> DetectDocumentQualityAsync(PlatformImage image, DocumentQualityAnalyzerConfiguration configuration = null)
Parameters
image
PlatformImage configuration
DocumentQuality Analyzer Configuration Configure the properties for analyzing quality of the image. Optional.
Returns
GetAllPagesAsync()
Returns all scanned pages currently in persistent storage.
[Obsolete("This makes use of the legacy page storage feature. Prefer to use the new ScannedDocument and ScannedPage classes and related APIs.")]
Task<IReadOnlyCollection<IScannedPage>> GetAllPagesAsync()
Returns
ParseBarcodeDocument(string)
Parses the string into one of the supported document type or returns null if none of the supported document types was detected
Parameters
barcodeText
string
Returns
PerformOcrAsync(IEnumerable<FileImageSource>, OcrConfig)
Performs OCR on an image.
Task<OcrResult> PerformOcrAsync(IEnumerable<FileImageSource> sources, OcrConfig configuration = null)
Parameters
sources
IEnumerable<FileImage >Source Images containing text.
configuration
OcrConfig The OCR configuration. If the value is not set, The default value used will be [OCRMode.ScanbotOCR] which is the new ML based configuration. The langauges string is mandatory only if we use the old [Tessarat] based engine.
Returns
ReconstructPage(string, PointF[], ParametricFilter[], DocumentDetectionStatus)
Reconstructs the Page object from the pageId and other parameters, received previously in the document detection result.
[Obsolete("This makes use of the legacy page storage feature. Prefer to use the new ScannedDocument and ScannedPage classes and related APIs.")]
Task<IScannedPage> ReconstructPage(string id, PointF[] polygon, ParametricFilter[] filter, DocumentDetectionStatus status)
Parameters
id
stringPage Identifier
polygon
PointF[]Polygon of the detected document.
filter
ParametricFilter []Parametric filters array.
status
DocumentDetection Status Detection status of the detected page.
Returns
- Task<IScanned
Page > Page object of type IScannedPage.
RefreshImageUris(IEnumerable<IScannedPage>)
Updates the storage directory of existing pages. Required if you storage pages and their image paths locally and the internal storage directory changes. Expects at least one page
[Obsolete("This makes use of the legacy page storage feature. Prefer to use the new ScannedDocument and ScannedPage classes and related APIs.")]
Task<IReadOnlyCollection<IScannedPage>> RefreshImageUris(IEnumerable<IScannedPage> pages)
Parameters
pages
IEnumerable<IScannedPage >
Returns
ResizeImageAsync(ImageSource, int, ResultOptions)
Resizes an image asynchronously.
[Obsolete("This method may be updated to use PlatformImage or moved to ImageProcessor in the future")]
Task<ImageSource> ResizeImageAsync(ImageSource image, int maxSize, ResultOptions resultOptions = null)
Parameters
image
ImageSource Image to rotate.
maxSize
intThe output image max size (the image will be scaled while keeping the aspect ratio; maxSize is the greater length between width and height
resultOptions
ResultOptions Result options that specify the result image's storage details.
Returns
- Task<Image
Source > The rotated image.
RotateImageAsync(ImageSource, double, ResultOptions)
Rotates an image asynchronously.
[Obsolete("This method may be updated to use PlatformImage or moved to ImageProcessor in the future")]
Task<ImageSource> RotateImageAsync(ImageSource image, double degrees, ResultOptions resultOptions = null)
Parameters
image
ImageSource Image to rotate.
degrees
doubleDegrees counterclockwise.
resultOptions
ResultOptions Result options that specify the result image's storage details.
Returns
- Task<Image
Source > The rotated image.
WriteTiffAsync(IEnumerable<FileImageSource>, TiffOptions)
Writes the given images into a TIFF file. If more than one image is given, the function creates a multi-page TIFF. The function can optionally create a 1-bit encoded TIFF. The generated file will be deleted when calling CleanUp. If you want to keep the file, move it to a folder that you have control over.
Parameters
files
IEnumerable<FileImage >Source A collection of FileImageSource instances.
options
TiffOptions Options.