Skip to content

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.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.helpAnimationImage = UIImage(named: "icon")
[RGLDocReader shared].customization.helpAnimationImage = [UIImage imageNamed:@"icon"];
DocumentReader.Instance().customization().edit().setHelpAnimationImage(getDrawable(R.drawable.icon)).apply()
DocumentReader.Instance().customization().edit().setHelpAnimationImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.instance.customization.helpAnimationImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
    helpAnimationImage: "Base64String",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    helpAnimationImage: "Base64String"
});
DocumentReader.setCustomization({
    helpAnimationImage: "Base64String",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetHelpAnimationImage(GetDrawable(Resource.Drawable.icon)).Apply();

// iOS
RGLDocReader.Shared.Customization.HelpAnimationImage = UIImage.FromBundle("icon.png");
  • 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.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;

Next Steps