Scan Tips
The SDK provides an optional toolbar item within the scanning screen, that when clicked, will open some tips on how to get the best scan result. By default it is activated for photo payment and disabled for document scan and shows some default items. You can customize it according to your needs or disable it completely.
Disable
To disable the scan tips, set the ScanTips
property to null.
For Document Scan, the scan tips are disabled by default.
- Photo Payment
var photoPaymenConfig = new PhotoPaymentConfiguration();
photoPaymenConfig.ScanTips = null;
var result = await UI.StartPhotoPayment(photoPaymenConfig);
Customize
If you want to provide your own items instead of the default items, you can do that by providing your own list of DocutainListItem
.
Each item consists of an Image
, a Title
and a Message
.
- Document Scan
- Photo Payment
using Docutain.SDK.MAUI;
var scanTipsDefaultItems = UI.ScanTipsDefaultItems();
var scanConfig = new DocumentScannerConfiguration
{
ScanTips = new ScanTips
{
Items = [
scanTipsDefaultItems[1],
scanTipsDefaultItems[3],
new DocutainListItem { Image= "my_icon", Title= "my scanTips 3", Message= "my scantips as page 3\npage 1 is default page 2\npage 2 is default page 4"}
]
}
};
var result = await UI.ScanDocument(scanConfig);
using Docutain.SDK.MAUI;
var scanTipsDefaultItems = UI.ScanTipsDefaultItems();
var photoPaymenConfig = new PhotoPaymentConfiguration
{
ScanTips = new ScanTips
{
Items = [
scanTipsDefaultItems[1],
scanTipsDefaultItems[3],
new DocutainListItem { Image= "my_icon", Title= "my scanTips 3", Message= "my scantips as page 3\npage 1 is default page 2\npage 2 is default page 4"}
]
}
};
var result = await UI.StartPhotoPayment(photoPaymenConfig);
The following provides an overview of the currently available options to alter the ScanTips
:
Property | Type | Description |
---|---|---|
Items | DocutainListItem[] | The items you want to show within the scan tips. If you don't provide any items, some default items will be displayed. |
ToolbarItem | DocutainButton | The toolbar item that will be shown allowing the user to open the scan tips. |
You can get the default items used by the SDK to use them for your own list.
var scanTipsDefaultItems = UI.ScanTipsDefaultItems();
The following sample alters the ToolbarItem
icon.
- Document Scan
- Photo Payment
var scanConfig = new DocumentScannerConfiguration();
scanConfig.ScanTips.ToolbarItem.Icon = "my_icon";
var result = await UI.ScanDocument(scanConfig);
var photoPaymenConfig = new PhotoPaymentConfiguration();
photoPaymenConfig.ScanTips.ToolbarItem.Icon = "my_icon";
var result = await UI.StartPhotoPayment(photoPaymenConfig);