EPL /ZPL printing for windows mobile 6

本文关键字:windows mobile for printing ZPL EPL | 更新日期: 2023-09-27 18:12:07

嗨,在windows mobile 6和c#中使用EPL/ZPL代码开发蓝牙打印[Zebra Printer]在动态添加数据时不打印…

    SerialPort comPort1 = new SerialPort("COM5", 57600, Parity.None, 8, StopBits.One);
    comPort1.Open();
    StringBuilder sb = new StringBuilder();
    sb.Append(@"! 0 200 200 400 1
    LABEL
    CONTRAST 0
    TONE 0
    SPEED 5
    PAGE-WIDTH 600
    BAR-SENSE
    ;// PAGE 0000000006000400
    T 0 0 154 4 Location Transfer
    T 0 0 28 101 PDACode :
    T 0 0 5 77 Trans.Ref No:
    T 0 0 114 105 " + Utility.PdaCode + @"
    T 0 0 80 183 To:
    T 0 0 114 129 " + FromTrnsfr + @" 
    T 0 0 12 126 From.Ref No:
    T 0 0 54 223 Route:
    T 0 0 63 154 From:
    T 0 0 115 183 " + cbToLocation.Text + @"
    T 0 0 390 211 " + vehicleId + @"
    T 0 0 302 208 Vehicle No:
    T 0 0 115 156 " + cbFromLocation.Text.ToString() + @"
    T 0 0 289 184 Travel Mode:
    T 0 0 390 186 " + TraveType + @"
    BOX 100 275 446 299 1
    T 0 0 107 278 SL No
    T 0 0 246 278 MU Code
    T 0 0 115 224 " + RouteCode + @"
    BT 0 0 0
    VB 128 2 0 30 519 348 RefNo
    BT OFF
    LINE 172 298 172 277 2
    LINE 445 299 101 299 2
    T 0 0 114 83 DummyTrnsfrNu
    FORM
    PRINT
    ");
    comPort1.WriteLine(sb.ToString());//"PRINT");
    System.Threading.Thread.Sleep(800);
    comPort1.Close();

---------------> 上面没有印刷…

---------------->下面正在打印.......

                sb.Append(@"! 0 200 200 400 1
LABEL
CONTRAST 0
TONE 0
SPEED 5
PAGE-WIDTH 600
BAR-SENSE
;// PAGE 0000000006000400
T 0 0 154 4 Location Transfer
T 0 0 28 101 PDACode :
T 0 0 5 77 Trans.Ref No:
T 0 0 114 105 DummyPDACode
T 0 0 80 183 To:
T 0 0 114 129 Dummyfrom
T 0 0 12 126 From.Ref No:
T 0 0 54 223 Route:
T 0 0 63 154 From:
T 0 0 115 183 ToLocDummy
T 0 0 390 211 DummyVehicle
T 0 0 302 208 Vehicle No:
T 0 0 115 156 FromLoDummy
T 0 0 289 184 Travel Mode:
T 0 0 390 186 DummyMode
BOX 100 275 446 299 1
T 0 0 107 278 SL No
T 0 0 246 278 MU Code
T 0 0 115 224 DummyRoute
BT 0 0 0
VB 128 2 0 30 519 348 RefNo
BT OFF
LINE 172 298 172 277 2
LINE 445 299 101 299 2
T 0 0 114 83 DummyTrnsfrNu
FORM
PRINT");

谁能帮忙??

EPL /ZPL printing for windows mobile 6

您确定正在连接的变量是正确的吗?在某些情况下,您执行ToString(),而在其他情况下,您什么都不做。如果你捕获你的"动态"answers"测试"打印的字符串输出,它们在去打印机之前匹配吗?另外,确保在"PRINT"后面有一个CRLF以便打印标签