SetBarcodePayloadEncoding

條碼

描述

選擇二維條碼酬載文字轉成位元組的方式。請傳入 TPDFlibBarcodePayloadEncoding 值的序號。系統 ANSI 轉換用 0(bpeSystemANSI)、原始 UTF-8 用 1(bpeUTF8),2(bpeUTF8WithECI)則把 Data Matrix 與 PDF417 酬載標記為 UTF-8,供相容的條碼讀取器辨識

在 Delphi 中可透過 BarcodePayloadEncoding 屬性直接指派同一狀態;此匯出函式是 DLL 與 dylib 的存取途徑。兩種模式都不會寫入 ECI 碼字。

語法

Delphi

Function DLSetBarcodePayloadEncoding(InstanceID, Encoding: Integer): Integer; Stdcall;

DLL

int DLSetBarcodePayloadEncoding(int InstanceID, int Encoding);

參數

Encoding0 = 系統 ANSI 字碼頁(預設),1 = UTF-8,2 = 含 ECI 標記的 UTF-8(適用於 Data Matrix 與 PDF417)

傳回值

0執行個體控制代碼無效或 Encoding 超出範圍;目前模式不變
1承載編碼已套用