DrawBarcode

向量圖形、條碼

描述

在所選頁面上繪製條碼

Code128 的條碼是 "B" 與 "C" 兩組字元集的組合,能得到最緊湊的編碼

把 Barcode 參數設為 3(Code128)並在適當位置放進 "[FNC1]" 字串,即可繪製 GS1-128 條碼(又稱 EAN-128)。例如:

"[FNC1]21ABC123[FNC1]2013"

上面的例子表示序號(AI 21)為 "ABC123",產品變體(AI 20)為 "13"

語法

Delphi

Function TPDFlib.DrawBarcode(Left, Top, Width, Height: Double; Const Text: WideString; Barcode, Options: Integer): Integer;

ActiveX

Function PDFlib::DrawBarcode(Left As Double, Top As Double, Width As Double, Height As Double, Text As String, Barcode As Long, Options As Long) As Long

DLL

int DLDrawBarcode(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * Text, int Barcode, int Options);

參數

Left條碼左緣的水平座標
Top條碼上緣的垂直座標
Width條碼的寬度 條碼的高度
Height
Text條碼資料。在條碼資料字串後面附加以下內容即可旋轉條碼:/RC = 順時針旋轉 /RA = 逆時針旋轉 /RU = 旋轉 180 度
Barcode1 = Code39(又稱 Code 3 of 9) 2 = EAN-13 3 = Code128 4 = PostNet 5 = Interleaved 2 of 5
OptionsCode39:0 = 預設繪製 EAN-13:0 = 只畫條碼 1 = 延伸護線 2 = 畫出人類可讀數字 3 = 畫出人類可讀數字並加右側間隔 Code128:0 = 預設繪製 PostNet:0 = 預設繪製 Interleaved 2 of 5:0 = 不加檢查碼、無護線 1 = 加檢查碼字元、無護線 2 = 不加檢查碼、畫護線 3 = 加檢查碼字元並畫護線 要把條碼線寬縮減 10%,把 Options 參數值加 10

傳回值

0無法繪製條碼。Barcode 或 Options 參數無效。
1條碼繪製成功