Messages
Status Message
- Set a status message next to the frame:
DocumentReader.setConfig({
customization: {
status: "Hello"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Turn on/off the status message:
DocumentReader.setConfig({
customization: {
showStatusMessages: true
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the text font for the status message:
DocumentReader.setConfig({
customization: {
statusTextFont: "Avenir-HeavyOblique"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set a font style to the status message:
DocumentReader.setConfig({
customization: {
statusTextFontStyle: Regula.DocumentReader.Enum.FontStyle.BOLD
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Size of main text status (sp):
DocumentReader.setConfig({
customization: {
statusTextSize: 16
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the hex color code for the main text status:
DocumentReader.setConfig({
customization: {
statusTextColor: "#e02712"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the hex color code for the current text status background:
DocumentReader.setConfig({
customization: {
statusBackgroundColor: "#32a852"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- 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:
DocumentReader.setConfig({
customization: {
statusPositionMultiplier: 0.5
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
Result Status Message
- Set a result status message next to the frame:
DocumentReader.setConfig({
customization: {
resultStatus: "Hello"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Turn the result status message on/off:
DocumentReader.setConfig({
customization: {
showResultStatusMessages: true
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the text font for the current status:
DocumentReader.setConfig({
customization: {
resultStatusTextFont: "Avenir-HeavyOblique"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set a font style to the result status message:
DocumentReader.setConfig({
customization: {
resultStatusTextFontStyle: Regula.DocumentReader.Enum.FontStyle.BOLD
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the size of current text status (sp):
DocumentReader.setConfig({
customization: {
resultStatusTextSize: 16
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the hex color code for the current text status:
DocumentReader.setConfig({
customization: {
resultStatusTextColor: "#e02712"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- Set the hex color code for the current text status background:
DocumentReader.setConfig({
customization: {
resultStatusBackgroundColor: "#3812e0"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- 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:
DocumentReader.setConfig({
customization: {
resultStatusPositionMultiplier: 0.5
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
Custom Status Message
- Create a custom status:
DocumentReader.setConfig({
customization: {
customLabelStatus: "Hello, world!"
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });
- 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:
DocumentReader.setConfig({
customization: {
customStatusPositionMultiplier: 0.5
},
}, (str) => { console.log(str) }, (error) => { console.log(error) });