How do I print using a META tag?

Version 2

    Verified Product Versions

    Wavelink Naurtech CETerm 5.7

    Using META tags, you can print data in one of two ways.

     

    HTTP-Equiv=”ZebraLabel_Print” content= Label contents

     

    This tag is used to provide the contents of a label which is to be sent to a Zebra QL 320 printer. Currently, there is no Zebra specific behavior so it should work with any printer. The content is sent to the printer with the escape sequences expanded.

     

    The value cannot be longer than 1024 characters. This tag must be used in conjunction with the ZebraLabel_Complete tag described below. Configure the printer serial port via Session -> Configure -> Printer -> Serial Config.

     

    Example:

     

    <HTML>

    <HEAD>

     

    <META HTTP-Equiv=”ZebraLabel_Print” Content=” ! 0 200 200 581 1\r\nLABEL\r\n

    CONTRAST 0\r\nTONE 0\r\nSPEED 3\r\n

    PAGE-WIDTH 240\r\nBAR-SENSE\r\nTEXT90 4 3 36 288 $22.88\r\n

    TEXT90 5 2 163 273 SWEATSHIRT\r\nVBARCODE UPCA 2 1 45 139 576 04364503284\r\n

    TEXT90 7 0 191 511 043645032841\r\nTEXT90 5 0 4 524 COMPARE AT\r\n

    TEXT90 4 0 30 508 $ 30.00\r\nTEXT90 5 0 115 575 ZD-180-KL\r\n

    TEXT90 5 2 119 269 ALL COTTON\r\nTEXT90 7 0 114 389 01/17/98\r\n

    TEXT90 0 0 208 173 EA00-732-00560\r\nTEXT90 5 0 82 519 ELSEWHERE\r\n

    BOX 189 358 217 527 1\r\nFORM\r\nPRINT\r\n”>

     

    <META HTTP-Equiv=”ZebraLabel_Complete” Content=”Javascript:PrintingComplete(‘%ld’);”>

    </HEAD>

    <BODY>

    </BODY>

    </HTML>

     

    HTTP-Equiv=”ZebraLabel_Complete” content= URL | Javascript function

     

    This tag specifies the action to be performed when printing of the label is complete. You can either redirect your application to another page or execute a Javascript function which must be defined on the same page as this tag. A status code, where 0 represents success will be sent from the browser. You must be sure to handle this by setting up the Querystring or function parameter accordingly, depending upon the method you choose.

     

    This tag must be used in conjunction with the ZebraLabel_Print tag described above.

     

    Error/Status Codes:

     

    0 – Label printed successfully.

    1 – Error occurred printing label.

    Example:

     

    <HTML>

    <HEAD>

    <META HTTP-Equiv=”ZebraLabel_Print”

      Content=” ! 0 200 200 581 1\r\nLABEL\r\……………………. FORM\r\nPRINT\r\n”>

    <META HTTP-Equiv=”ZebraLabel_Complete”

    Content=”Javascript:PrintingComplete(‘%ld’);”>

    </HEAD>

    <BODY>

    </BODY>

    <SCRIPT>

    function PrintingComplete(status)

    {

    var str;

    str = “Label print completed with a status code of “ + status;

    alert(str);

    }

    </SCRIPT>

    </HTML>