Custom Text

Defined under the namespace Scandit.Datacapture.Label

CustomText
class CustomText : TextField

Added in version 6.22.0

Defines a text field with customizable OCR recognition and validation patterns. This field type uses optical character recognition (OCR) to extract text content from labels and can apply regex patterns for content validation.

constructor(name)
constructor(name: string)

Added in version 6.22.0

Builds a new instance of this class with the provided name.

dataTypePatterns
dataTypePatterns: string[]

Added in version 6.22.0

Context-identifying keywords or phrases used to distinguish between fields that may have similar patterns. These patterns help Smart Label Capture identify which field the captured data belongs to when multiple fields could match the same regex pattern.

For example, when a label contains both expiry date and packing date fields, you can use dataTypePatterns like [“exp”, “expiry”] for the expiry date field and [“pack”, “packing”] for the packing date field to help the system correctly identify which date is which.

location
location: LabelFieldLocation | null

Added in version 6.22.0

The spatial location constraint for this text field within the label. This can be used to specify where on the label this field is expected to appear, helping to improve recognition accuracy and speed by focusing the OCR processing area.