Messages
Status Message
- Set a status message next to the frame:
DocReader.shared.customization.status = "Hello"
[RGLDocReader shared].customization.status = @"Hello";
DocumentReader.Instance().customization().edit().setStatus("Hello").apply()
DocumentReader.Instance().customization().edit().setStatus("Hello").apply();
DocumentReader.instance.customization.status = "Hello";
DocumentReader.setCustomization({
status: "Hello",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
status: "Hello"
});
DocumentReader.setCustomization({
status: "Hello",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetStatus("Hello, world!").Apply();
// iOS
RGLDocReader.Shared.Customization.Status = "Hello";
- Turn on/off the status message:
DocReader.shared.customization.showStatusMessages = true
[RGLDocReader shared].customization.showStatusMessages = YES;
DocumentReader.Instance().customization().edit().setShowStatusMessages(true).apply()
DocumentReader.Instance().customization().edit().setShowStatusMessages(true).apply();
DocumentReader.instance.customization.showStatusMessages = true;
DocumentReader.setCustomization({
showStatusMessages: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
showStatusMessages: true
});
DocumentReader.setCustomization({
showStatusMessages: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetShowStatusMessages(true).Apply();
// iOS
RGLDocReader.Shared.Customization.ShowStatusMessages = true;
- Set the text font for the status message:
DocReader.shared.customization.statusTextFont = UIFont.italicSystemFont(ofSize: 14)
[RGLDocReader shared].customization.statusTextFont = [UIFont italicSystemFontOfSize:14];
DocumentReader.Instance().customization().edit().setStatusTextFont(Typeface.SERIF).apply()
DocumentReader.Instance().customization().edit().setStatusTextFont(Typeface.SERIF).apply();
DocumentReader.instance.customization.statusTextFont = Font(
"sans-serif-thin",
size: 14,
style: FontStyle.BOLD,
);
DocumentReader.setCustomization({
statusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, _ => { }, _ => { });
DocumentReader.setCustomization({
statusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
});
DocumentReader.setCustomization({
statusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Customization().Edit().SetStatusTextFont(Typeface.Serif).Apply();
// iOS
RGLDocReader.Shared.Customization.StatusTextFont = UIFont.PreferredBody.WithSize(18);
- Set the size of the main text status (sp):
DocumentReader.Instance().customization().edit().setStatusTextSize(14).apply()
DocumentReader.Instance().customization().edit().setStatusTextSize(14).apply();
DocumentReader.instance.customization.statusTextFont = Font(
"sans-serif-thin",
size: 14,
style: FontStyle.BOLD,
);
DocumentReader.setCustomization({
statusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, _ => { }, _ => { });
DocumentReader.setCustomization({
statusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
});
DocumentReader.setCustomization({
statusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Customization().Edit().SetStatusTextSize((Java.Lang.Integer)14).Apply();
- Set the hex color code for the main text status:
DocReader.shared.customization.statusTextColor = UIColor.red
[RGLDocReader shared].customization.statusTextColor = [UIColor redColor];
DocumentReader.Instance().customization().edit().setStatusTextColor("#ff0000").apply()
DocumentReader.Instance().customization().edit().setStatusTextColor("#ff0000").apply();
DocumentReader.instance.customization.statusTextColor = Colors.red;
DocumentReader.setCustomization({
statusTextColor: 0xffff0000,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
statusTextColor: 0xffff0000
});
DocumentReader.setCustomization({
statusTextColor: 0xffff0000,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetStatusTextColor("#ff0000").Apply();
// iOS
RGLDocReader.Shared.Customization.StatusTextColor = UIColor.Red;
- Set the hex color code for the current text status background:
DocReader.shared.customization.statusBackgroundColor = UIColor.green
[RGLDocReader shared].customization.statusBackgroundColor = [UIColor greenColor];
DocumentReader.Instance().customization().edit().setStatusBackgroundColor("#32a852").apply()
DocumentReader.Instance().customization().edit().setStatusBackgroundColor("#32a852").apply();
DocumentReader.instance.customization.statusBackgroundColor = Colors.green;
DocumentReader.setCustomization({
statusBackgroundColor: 0xff00ff00,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
statusBackgroundColor: 0xff00ff00
});
DocumentReader.setCustomization({
statusBackgroundColor: 0xff00ff00,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetStatusBackgroundColor("#32a852").Apply();
// iOS
RGLDocReader.Shared.Customization.StatusBackgroundColor = UIColor.Green;
- You can change the location of the status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocReader.shared.customization.statusPositionMultiplier = 0.5
[RGLDocReader shared].customization.statusPositionMultiplier = 0.5;
DocumentReader.Instance().customization().edit().setStatusPositionMultiplier(0.5F).apply()
DocumentReader.Instance().customization().edit().setStatusPositionMultiplier(0.5F).apply();
DocumentReader.instance.customization.statusPositionMultiplier = .5;
DocumentReader.setCustomization({
statusPositionMultiplier: 0.5,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
statusPositionMultiplier: 0.5
});
DocumentReader.setCustomization({
statusPositionMultiplier: 0.5,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetStatusPositionMultiplier((Java.Lang.Float)0.5F).Apply();
// iOS
RGLDocReader.Shared.Customization.StatusPositionMultiplier = 0.5F;
Result Status Message
- Set a result status message next to the frame:
DocReader.shared.customization.resultStatus = "Hello"
[RGLDocReader shared].customization.resultStatus = @"Hello";
DocumentReader.Instance().customization().edit().setResultStatus("Hello").apply()
DocumentReader.Instance().customization().edit().setResultStatus("Hello").apply();
DocumentReader.instance.customization.resultStatus = "Hello";
DocumentReader.setCustomization({
resultStatus: "Hello",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
resultStatus: "Hello"
});
DocumentReader.setCustomization({
resultStatus: "Hello",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetResultStatus("Hello, world!").Apply();
// iOS
RGLDocReader.Shared.Customization.ResultStatus = "Hello";
- Turn the result status message on/off:
DocReader.shared.customization.showResultStatusMessages = true
[RGLDocReader shared].customization.showResultStatusMessages = YES;
DocumentReader.Instance().customization().edit().setShowResultStatusMessages(true).apply()
DocumentReader.Instance().customization().edit().setShowResultStatusMessages(true).apply();
DocumentReader.instance.customization.showResultStatusMessages = true;
DocumentReader.setCustomization({
showResultStatusMessages: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
showResultStatusMessages: true
});
DocumentReader.setCustomization({
showResultStatusMessages: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetShowResultStatusMessages(true).Apply();
// iOS
RGLDocReader.Shared.Customization.ShowResultStatusMessages = true;
- Set the text font for the current status:
DocReader.shared.customization.resultStatusTextFont = UIFont.italicSystemFont(ofSize: 14)
[RGLDocReader shared].customization.resultStatusTextFont = [UIFont italicSystemFontOfSize:14];
DocumentReader.Instance().customization().edit().setResultStatusTextFont(Typeface.SERIF).apply()
DocumentReader.Instance().customization().edit().setResultStatusTextFont(Typeface.SERIF).apply();
DocumentReader.instance.customization.resultStatusTextFont = Font(
"sans-serif-thin",
size: 14,
style: FontStyle.BOLD,
);
DocumentReader.setCustomization({
resultStatusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, _ => { }, _ => { });
DocumentReader.setCustomization({
resultStatusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
});
DocumentReader.setCustomization({
resultStatusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Customization().Edit().SetResultStatusTextFont(Typeface.Serif).Apply();
// iOS
RGLDocReader.Shared.Customization.ResultStatusTextFont = UIFont.PreferredBody.WithSize(18);
- Set the size of the current text status (sp):
DocumentReader.Instance().customization().edit().setResultStatusTextSize(14).apply()
DocumentReader.Instance().customization().edit().setResultStatusTextSize(14).apply();
DocumentReader.instance.customization.resultStatusTextFont = Font(
"sans-serif-thin",
size: 14,
style: FontStyle.BOLD,
);
DocumentReader.setCustomization({
resultStatusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, _ => { }, _ => { });
DocumentReader.setCustomization({
resultStatusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
});
DocumentReader.setCustomization({
resultStatusTextFont: {
name: "sans-serif-thin",
size: 14,
style: Enum.FontStyle.BOLD,
},
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Customization().Edit().SetResultStatusTextSize((Java.Lang.Integer)14).Apply();
- Set the hex color code for the current text status:
DocReader.shared.customization.resultStatusTextColor = UIColor.purple
[RGLDocReader shared].customization.resultStatusTextColor = [UIColor purpleColor];
DocumentReader.Instance().customization().edit().setResultStatusTextColor("#ff0000").apply()
DocumentReader.Instance().customization().edit().setResultStatusTextColor("#ff0000").apply();
DocumentReader.instance.customization.resultStatusTextColor = Colors.purple;
DocumentReader.setCustomization({
resultStatusTextColor: 0xffffffff,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
resultStatusTextColor: 0xffffffff
});
DocumentReader.setCustomization({
resultStatusTextColor: 0xffffffff,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetResultStatusTextColor("#ff0000").Apply();
// iOS
RGLDocReader.Shared.Customization.ResultStatusTextColor = UIColor.Red;
- Set the hex color code for the current text status background:
DocReader.shared.customization.resultStatusBackgroundColor = UIColor.red
[RGLDocReader shared].customization.resultStatusBackgroundColor = [UIColor redColor];
DocumentReader.Instance().customization().edit().setResultStatusBackgroundColor("#ff0000").apply()
DocumentReader.Instance().customization().edit().setResultStatusBackgroundColor("#ff0000").apply();
DocumentReader.instance.customization.resultStatusBackgroundColor = Colors.red;
DocumentReader.setCustomization({
resultStatusBackgroundColor: 0xffff0000,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
resultStatusBackgroundColor: 0xffff0000
});
DocumentReader.setCustomization({
resultStatusBackgroundColor: 0xffff0000,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetResultStatusBackgroundColor("#32a852").Apply();
// iOS
RGLDocReader.Shared.Customization.ResultStatusBackgroundColor = UIColor.Black;
- You can change the location of the result status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocReader.shared.customization.resultStatusPositionMultiplier = 0.5
[RGLDocReader shared].customization.resultStatusPositionMultiplier = 0.5;
DocumentReader.Instance().customization().edit().setResultStatusPositionMultiplier(0.5F).apply()
DocumentReader.Instance().customization().edit().setResultStatusPositionMultiplier(0.5F).apply();
DocumentReader.instance.customization.resultStatusPositionMultiplier = .5;
DocumentReader.setCustomization({
resultStatusPositionMultiplier: 0.5,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
resultStatusPositionMultiplier: 0.5
});
DocumentReader.setCustomization({
resultStatusPositionMultiplier: 0.5,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetResultStatusPositionMultiplier((Java.Lang.Float)0.5F).Apply();
// iOS
RGLDocReader.Shared.Customization.ResultStatusPositionMultiplier = 0.5F;
Custom Status Message
- Create a custom status:
DocReader.shared.customization.customLabelStatus = NSAttributedString(string: "Hello, world!", attributes: [NSAttributedString.Key.foregroundColor: UIColor.red, NSAttributedString.Key.font: UIFont.italicSystemFont(ofSize: 18)])
[RGLDocReader shared].customization.customLabelStatus = [[NSAttributedString alloc] initWithString:@"Hello, world!" attributes:@{ NSForegroundColorAttributeName:[UIColor redColor], NSFontAttributeName:[UIFont italicSystemFontOfSize:18] }];
val str = SpannableString("Hello, world!")
str.setSpan(ForegroundColorSpan(Color.RED), 0, str.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
DocumentReader.Instance().customization().edit().setCustomLabelStatus(str).apply()
SpannableString str = new SpannableString("Hello, world!");
str.setSpan(new ForegroundColorSpan(Color.RED), 0, str.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
DocumentReader.Instance().customization().edit().setCustomLabelStatus(str).apply();
DocumentReader.instance.customization.customLabelStatus = "Hello, world!";
DocumentReader.setCustomization({
customLabelStatus: "Hello, world!",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
customLabelStatus: "Hello, world!"
});
DocumentReader.setCustomization({
customLabelStatus: "Hello, world!",
}, function (m) { }, function (e) { console.log(e); });
// Android
SpannableString str = new SpannableString("Hello, world!");
str.SetSpan(new ForegroundColorSpan(Color.Red), 0, str.Length(), SpanTypes.ExclusiveExclusive);
DocumentReader.Instance().Customization().Edit().SetCustomLabelStatus(str).Apply();
// iOS
RGLDocReader.Shared.Customization.CustomLabelStatus = new NSAttributedString("Hello, world!", foregroundColor: UIColor.Red, font: UIFont.ItalicSystemFontOfSize(18.0F));
- You can change the location of the custom status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocReader.shared.customization.customStatusPositionMultiplier = 1.0
[RGLDocReader shared].customization.customStatusPositionMultiplier = 1.0;
DocumentReader.Instance().customization().edit().setCustomStatusPositionMultiplier(1.0F).apply()
DocumentReader.Instance().customization().edit().setCustomStatusPositionMultiplier(1.0F).apply();
DocumentReader.instance.customization.customStatusPositionMultiplier = .5;
DocumentReader.setCustomization({
customStatusPositionMultiplier: 0.5,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
customStatusPositionMultiplier: 0.5
});
DocumentReader.setCustomization({
customStatusPositionMultiplier: 0.5,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetCustomStatusPositionMultiplier((Java.Lang.Float)1.0F).Apply();
// iOS
RGLDocReader.Shared.Customization.CustomStatusPositionMultiplier = 1.0F;