Instructions

The SDK can show an animation to help position a document correctly.
- Show/hide the help animation:
DocReader.shared.customization.showHelpAnimation = true
[RGLDocReader shared].customization.showHelpAnimation = YES;
DocumentReader.Instance().customization().edit().setShowHelpAnimation(true).apply()
DocumentReader.Instance().customization().edit().setShowHelpAnimation(true).apply();
DocumentReader.instance.customization.showHelpAnimation = true;
DocumentReader.instance.customization.showHelpAnimation = true
DocumentReader.setCustomization({
showHelpAnimation: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
showHelpAnimation: true
});
DocumentReader.setCustomization({
showHelpAnimation: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetShowHelpAnimation(true).Apply();
// iOS
RGLDocReader.Shared.Customization.ShowHelpAnimation = true;
- You can add an image for the help animation. If not set, the default image is used:
DocReader.shared.customization.uiConfiguration = DocReader.UIConfiguration {
$0.setImage(UIImage(named: "help_animation")!, forItem: .RGLCustomizationImageHelpAnimation)
}
UIImage *helpAnimation = [[UIImage imageNamed:@"help_animation"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
RGLDocReader.shared.customization.uiConfiguration = [RGLUIConfiguration configurationWithBuilderBlock:^(RGLUIConfigurationBuilder * _Nonnull builder) {
[builder setImage:helpAnimation forItem:RGLCustomizationImageHelpAnimation];
}];
DocumentReader.Instance().customization().edit().setImage(CustomizationImage.HELP_ANIMATION, getDrawable(R.drawable.help_animation)).apply()
DocumentReader.Instance().customization().edit().setImage(CustomizationImage.HELP_ANIMATION, getDrawable(R.drawable.help_animation)).apply();
DocumentReader.instance.customization.images.helpAnimation = image;
DocumentReader.instance.customization.images.helpAnimation = base64;
DocumentReader.setCustomization({
images: {
helpAnimation: base64
}
}, _ => { }, _ => { });
DocumentReader.setCustomization({
images: {
helpAnimation: base64
}
})
DocumentReader.setCustomization({
images: {
helpAnimation: base64
}
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Customization().Edit().SetImage(CustomizationImage.HelpAnimation, image).Apply();
// iOS
RGLDocReader.Shared.Customization.UiConfiguration = RGLUIConfiguration.ConfigurationWithBuilderBlock((RGLUIConfigurationBuilder builder) =>
{
builder.SetImage(image, Constants.RGLCustomizationImageHelpAnimation);
});
- To change the scaling of the help animation image, use:
DocReader.shared.customization.helpAnimationImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.helpAnimationImageContentMode = UIViewContentModeScaleAspectFit;
DocumentReader.Instance().customization().edit().setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX).apply()
val matrix = Matrix()
DocumentReader.Instance().customization().edit().setHelpAnimationImageMatrix(matrix).apply()
DocumentReader.Instance().customization().edit().setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX).apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().edit().setHelpAnimationImageMatrix(matrix).apply();
DocumentReader.instance.customization.helpAnimationImageTransformsIOS = ViewContentMode.SCALE_ASPECT_FIT;
DocumentReader.instance.customization.helpAnimationImageTransformsAndroid = [];
DocumentReader.instance.customization.helpAnimationImageTransformsIOS = ViewContentMode.SCALE_ASPECT_FIT
DocumentReader.instance.customization.helpAnimationImageTransformsAndroid = []
DocumentReader.setCustomization({
helpAnimationImageContentMode: Enum.UIViewContentMode.ScaleAspectFit,
helpAnimationImageMatrix: [],
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
helpAnimationImageContentMode: Enum.UIViewContentMode.ScaleAspectFit,
helpAnimationImageMatrix: []
});
DocumentReader.setCustomization({
helpAnimationImageContentMode: Enum.UIViewContentMode.ScaleAspectFit,
helpAnimationImageMatrix: [],
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetHelpAnimationImageScaleType(ImageView.ScaleType.Matrix).Apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().Customization().Edit().SetHelpAnimationImageMatrix(matrix).Apply();
// iOS
RGLDocReader.Shared.Customization.HelpAnimationImageContentMode = UIViewContentMode.ScaleAspectFit;