請問有誰知道:
Powerbuilder如何通過ZPL語言指令形式列印檢驗科條形碼,如列印條碼號為‘3003072503’的條碼號
希望有具體實作方法步驟和代碼,謝謝。
uj5u.com熱心網友回復:
要有開發檔案的吧,如果是串口應該類似以下fileopen('COM1'.....)
filewriter('....') //指令
fileclose(..)
uj5u.com熱心網友回復:
樓主是做HIS還是做LIS呀?/*zebra 888-TT列印機 EPL2命令說明
EPL2嚴格區分大小寫
A
語法 Ap1,p2,p3,p4,p5,p6,p7,“DATA”
引數 p1=以象素點為單位的水平起始位置
p2=以象素點為單位的垂直起始位置
p3=旋轉
Value Description
0 No rotation
1 90 degrees
2 180 degrees
3 270 degrees
4 No rotation
5 90 degrees
6 180 degrees
7 270 degrees
4-7是針對亞洲字體的設定
p4=字體選擇
Value Description
203 dpi 300 dpi
1 20.3 cpi, 6 pts, 25 cpi, 4 pts,
(8 x 12 dots) (12 x 20 dots)
2 16.9 cpi, 7 pts, 18.75 cpi, 6 pts,
(10 x 16 dots) (16 x 28 dots)
3 14.5 cpi, 10 pts, 15 cpi, 8 pts,
(12 x 20 dots) (20 x 36 dots)
4 12.7 cpi, 12 pts, 12.5 cpi, 10 pts,
(14 x 24 dots) (24 x 44 dots)
5 5.6 cpi, 24 pts, 6.25 cpi, 21 pts,
(32 x 48 dots) (48 x 80 dots)
6 Numeric Only Numeric Only
(14 x 19 dots) (14 x 19 dots)
7 Numeric Only Numeric Only
(14 x 19 dots) (14 x 19 dots)
亞洲列印機
Simplified Chinese, Japanese, Korean
8 203 dpi fonts : 24 x 24 dots
300 dpi Double-byte fonts : 36 x 36 dots
300 dpi Single-byte fonts : 24 x 36 dots
Traditional Chinese, Japanese
9 300 dpi Double-byte fonts: 36 x 36 dots
300 dpi Single-byte fonts : 24 x 36 dots
Korean - Reserved
p5=水平膨脹,值:1-6&8
p6=垂直膨脹,值:1-9
p7=N代表普通,R表示反轉圖象
"DATA"=資料
B
用于列印標準條碼
語法:Bp1,p2,p3,p4,p5,p6,p7,p8,“DATA”
引數 p1=以象素點為單位的水平起始位置
p2=以象素點為單位的垂直起始位置
p3=旋轉
Value Description
0 No rotation
1 90 degrees
2 180 degrees
3 270 degrees
p4=條碼選擇,參見條碼表
p5=窄條的象數寬度,參見條碼表
p6=寬條的象數寬度,參見條碼表
p7=條碼的象素高度
p8=列印可讀代碼,值 B=是,N=否
"DATA"=資料
條碼表
Description P4 P5 P6
Value Value Value
Code 39 std. or extended 3 1-10 Y
Code 39 with check digit 3C 1-10 N
Code 93 9 1-10 N
Code 128 UCC
Serial Shipping Container Code 0 1-10 N
Code 128 auto A, B, C modes 1 1-10 N
Code 128 mode A 1A 1-10 N
Code 128 mode B 1B 1-10 N
Code 128 mode C 1C 1-10 N
Code 128 with Deutsche Post check digit4 1D 2-10 N
Codabar K 1-10 Y
EAN8 E80 2-4 N
EAN8 2 digit add-on E82 2-4 N
EAN8 5 digit add-on E85 2-4 N
EAN13 E30 2-4 N
EAN13 2 digit add-on E32 2-4 N
EAN13 5 digit add-on E35 2-4 N
German Post Code 2G 3-4 N
Interleaved 2 of 5 2 1-10 Y
Interleaved 2 of 5 with mod 10 check digit 2C 1-10 Y
Interleaved 2 of 5 with human readable
check digit 2D 1-10 Y
Postnet 5, 9, 11 & 13 digit1 P — N
Planet 11 & 13 digit1 PL — N
Japanese Postnet3 J — —
UCC/EAN 1282 1E 1-10 N
UPC A UA0 2-4 N
UPC A 2 digit add-on UA2 2-4 N
UPC A 5 digit add-on UA5 2-4 N
UPC E UE0 2-4 N
UPC E 2 digit add-on UE2 2-4 N
UPC E 5 digit add-on UE5 2-4 N
UPC Interleaved 2 of 5 2U 1-10 Y
Plessey (MSI-1) with mod. 10 check digit L — —
MSI-3 with mod. 10 check digit M — —
*/
/*
as_type[] 型別:區分是條碼字體還是普通字體
as_x[] X:X坐標
as_y[] Y:Y坐標
as_text[] 列印的內容
*/
integer li_FileNum
string print_com="LPT1" //設定列印機介面
integer li_i
string ls_printtext //需要列印的內容
string ls_type //列印的標志 A為字符(包含漢字),B為條碼。注意,該處為大寫
string ls_x,ls_y //列印的X、Y坐標
string ls_text //列印內容
string ls_printtype
ls_printtext=''
ls_printtext+='N~n'
//ls_printtext+='q800~n'
//ls_printtext+='Q90,1~n'
//ls_printtext+='S4'
//ls_printtext+='D15~n'
for li_i=1 to upperbound(as_type[])
ls_type = as_type[li_i]
///////////////////---A表示漢字,B表示條碼,N表示數字,請用大寫
if ls_type='A' or ls_type='a' or ls_type='N' or ls_type='n' then
ls_printtype='A'
elseif ls_type='B' or ls_type='b' then
ls_printtype='B'
end if
ls_x = as_x[li_i]
ls_y = as_y[li_i]
ls_text =as_text[li_i]
// if ls_text='' then ls_text='請輸入列印內容!'
if ls_type='A' or ls_type='a' then
ls_printtext+=ls_printtype+ls_x+','+ls_y+',0,8,1,1,N,"'+ls_text+'"~n'
elseif ls_type='B' or ls_type='b' then
ls_printtext+=ls_printtype+ls_x+','+ls_y+',0,1,2,2,60,B,"'+ls_text+'"~n'
elseif ls_type='N' or ls_type='n' then
ls_printtext+=ls_printtype+ls_x+','+ls_y+',0,3,1,1,N,"'+ls_text+'"~n'
end if
next
ls_printtext+='P1~n'
li_FileNum = FileOpen(print_com,LineMode!, Write!, LockWrite!, Append!)
FileWrite(li_FileNum, ls_printtext)
fileclose(li_filenum)
return li_filenum
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/44823.html
標籤:基礎類
