跳轉到主要內容
此物件提供對條碼區塊特定屬性的存取:區塊中影像預處理與識別的參數、條碼的型別,以及條碼的已辨識文字。IBarcodeBlock 介面衍生自 IBlock 介面,並繼承其所有屬性。 此物件的屬性可分為兩個群組:
  • 影響區塊中條碼辨識流程的屬性。這些屬性為 ImageProcessingParams 和 BarcodeParams,您可透過這些屬性為單一區塊設定條碼處理的特殊參數。
  • 以及所有其他屬性,這些屬性代表識別結果及待匯出至結果的資料。
對於使用結構化附加模式的 QR Code (即多個條碼以邏輯方式連結以編碼更多資料) ,此物件亦提供對序列中每個 QR Code 所含特殊資訊的存取,以確保正確解碼。若您打算識別結構化附加 QR Code,需自行實作演算法,利用三個以 QrCode 為前綴的屬性,將序列中各條碼所編碼的資料合併。此特殊資訊不包含於條碼文字 (Text 和 BarcodeText 屬性) 中,亦不會匯出至結果。

Properties

Provides access to the set of properties affecting the process of barcode recognition.

Provides access to the set of properties affecting image preprocessing inside the barcode block.

, read-only

Stores the barcode type detected during recognition.

Contains the recognized text of the barcode. The recognized text is represented as a collection of characters, and advanced character properties can be accessed.

, read-only

此屬性可透過物件編輯文字。此屬性僅在識別與合成完成後方可使用。若尚未執行合成,此屬性將回傳 0。

, read-only

Returns the number of QR Codes in the structured-append sequence. This information is contained in special data section of a QR Code, and this property is only meaningful when the code is part of a structured-append sequence.

, read-only

Returns parity data of the QR Code. As this value is the same for all QR Codes of the sequence, it can be used to check that the codes you try to join together really belong to the same sequence. This information is contained in special data section of a QR Code, and this property is only meaningful when the code is part of a structured-append sequence.

, read-only

Returns the index of QR Code in the structured-append sequence. This information is contained in special data section of a QR Code, and this property is only meaningful when the code is part of a structured-append sequence.

, read-only

Stores the supplementary barcode type detected during recognition. This property is only useful for barcodes of typeEAN 8, 13,UPC-A, andUPC-E.

, read-only

Stores the supplementary barcode value detected during recognition. If the supplementary barcode was detected, this property contains 2 or 5 last digits of the recognized text of the barcode. The property is 僅適用於以下型別的條碼EAN 8, 13,UPC-A,以及UPC-E

,唯讀

提供對條碼已辨識文字的存取,與 BarcodeText 屬性相同,但以 Unicode string 表示。此屬性不允許編輯文字,若透過 EditableText 屬性進行編輯,此屬性的值不會更新。

Methods

NameDescription
CopyFrom使用另一個物件的相似屬性值,初始化目前物件的屬性。

Windows

BarcodeBlock

Linux 和 macOS

BarcodeBlockLinuxMac 物件圖

輸出 Parameter

此物件是 Block 物件的 GetAsBarcodeBlock 方法的輸出 Parameter。

另請參閱

使用 Layout 和 Block Working with Text 使用屬性