parthdepani / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

Provide DPL sample in sample.html #202

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

/***************************************************************************
* Prototype function for printing raw DPL commands
* Usage:
*    qz.append('\x02L\nH07\nD11\n19110801000002510K OHM 1/4 
WATT\n1a6210000000050590PCS\nE\n');
*    qz.print();
***************************************************************************/
function printDPL() {
    if (notReady()) { return; }

    // Send characters/raw commands to qz using "append"
    // This example is for DPL.  Please adapt to your printer language
    // Hint:  Carriage Return = \r, New Line = \n, Escape Double Quotes= \"
    var pcs = '590';
    var desc = '10K OHM 1/4 WATT';       
    qz.append('\x02L\n');   // STX L - Enter Label Formatting
    qz.append('H07\n');     // Heat String of 7
    qz.append('D11\n');     // Set Width and Height Dot Size
    qz.append('191108010000025' + desc + '\n');    // Select smooth Font
    qz.append('1a6210000000050' + pcs + 'PCS\n');  // Select Bar code type 'a'
    qz.append('E\n');       // End Label format mode and print
    qz.print();
 }

Original issue reported on code.google.com by tres.fin...@gmail.com on 7 Jan 2014 at 7:40