开发者

how to print ASCII character codes in EPL

开发者 https://www.devze.com 2023-04-12 19:04 出处:网络
I\'m working on a webproject that involves sending EPL2 printing codes to a Zebra label printer. It does this by writing a file to the local computer with the EPL2-codes and calling an ActiveX-compone

I'm working on a webproject that involves sending EPL2 printing codes to a Zebra label printer. It does this by writing a file to the local computer with the EPL2-codes and calling an ActiveX-component that executes a command to send the EPL2-code to the printer port. I've got all of it working except one thing: I need to send the degree character ° to the printer to be printed on the label. When I just send it to the printer with that in the printing codes it prints a zero with a diagonal strike through it instead of what I expect. The file written to the computer definitely contains the right character so that can be ruled out.

I've consulted the programming manual (http://www.geksagon.ru/i/2/EPL2_Manual.pdf) and found some information: turns out I'm printing symbol 237 instead of 248 in the standard character set but there is no hint as to how 开发者_JAVA百科it can be fixed. Setting different encodings prints other symbols but there is no way to determine how I can print the °.

Does anyone know how I can print that character or - alternatively - print characters by their character code?

Edit: The following image shows the default character map as printed in the manual, much like an HTML code table I would expect there to be a way to print the degree sign by passing the character code. (In an HTML file ° or ° would show as °, I'm looking for a way to do the same thing with EPL2.)

how to print ASCII character codes in EPL


I have Found that using windows 7 and even typing the CHars to be printed into the web interface for the ZPL printers there are problems. the thing that worked for me was to enter alt + 0248 which displays as ø will give me the alt + 248 symbol °


Try setting your code page with I8,A,001 and using the character code 176. 176 is the degree symbol in both the Windows 1252 code page and Unicode, so hopefully your ActiveX control will do the right thing with it.


Any character can be printed by using ^CI command. Use ^CI27 to print any character shown in above list. How to do ?

Use below coding:
^XA~TA000~JSN^LT0^MMT^MNW^MTT^PON^PMN^LH20,00^JMA^PRC,C,C^MD12^JUS^LRN
^CI27^XZ
^XA^LL1000^PW1500
^FO30,30^A0N,30,30^FD Here to print Ø : -OPTICVAL^FS
^FO30,80^A0N,30,30^FD Registered ® ^FS
^FO30,130^A0N,30,30^FD Copy Right © ^FS
^FO30,180^A0N,30,30^FD Degree ° ^FS
^PQ1,0,1,N^XZ

Any character can be taken from MS Office or any other software and paste into above code, just I have entered into the above script, you will able to print anything by Zebra Printer.


You use the following in ZPL Zebra printers: \u0022 for " _5e for ^ hat or caret circumflex accent
_26 for & ampersand \u00b0 for ° &degree sign °C °F etc

depends on the font you are using though

0

精彩评论

暂无评论...
验证码 换一张
取 消