Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
Hi I am trying to print the barcode using ZPL command by following the same approach "Generic/Text only" but it is printing empty label and also it is working in IE only.

Can any one please help me to print a barcode using ZPL commands to ZPL printer from browser.


please find the sample code snippet here under


<div id="raw">
        <pre>
^XA^CFE^PR12^FS
^BY2^BCN,100,N^FO090,0100^FDHF9XI7A^FS
^XZ
</pre>
    </div>
    <input onclick="varitext()" type="button" value="Print" />



Script

function varitext(text) {
    text = document.getElementById('raw');
    print(text.textContent)
}
Posted

1 solution

Srinu, do you need ZPL code if yes then you can get it from ZPL code book. Otherwise you can use simple graphics code for printing the barcode. If you need the same below is the link for same

label printing help needed[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900