4 Replies Latest reply on Jun 21, 2018 9:45 AM by Robin West

    Zebra Browser Print line break, how to?

    Marcos Ferreira

      Hi, i'm using the sample code (html javascript) to print on zebra browser print. I'v like to know how to make a line break, because \r\n not working as expected. Thanks

        • Re: Zebra Browser Print line break, how to?
          Marcos Ferreira

          I forgot to mention printer model: GC420t. Printing ok on zebra browser but i cannot break the line

            • Re: Zebra Browser Print line break, how to?
              Robin West

              Hi Marcos, There are several methods.  Can you share what you are attempting to send to the printer? 

                • Re: Zebra Browser Print line break, how to?
                  Marcos Ferreira

                  Hi!

                   

                  Well i have tried in some ways. On DevDemo.js, sendData function:

                   

                  selected_printer.send(format_start + $('#entered_name').val() + format_end, printComplete, printerError);

                   

                  Things i have tried:

                   

                  selected_printer.send(format_start + $('#entered_name').val() + "\r\n" + $('#entered_age').val() + format_end, printComplete, printerError);

                   

                  selected_printer.send(format_start + $('#entered_name').val() + "\n" + $('#entered_age').val() + format_end, printComplete, printerError);

                   

                  selected_printer.send(format_start + $('#entered_name').val() + "<br>" + $('#entered_age').val() + format_end, printComplete, printerError);

                   

                  selected_printer.send(format_start + $('#entered_name').val() +

                  $('#entered_age').val() + format_end, printComplete, printerError);

                   

                  With single quote, double quote, none of these things worked. Thanks for your reply.

                    • Re: Zebra Browser Print line break, how to?
                      Robin West

                      Hi Marcos, Thanks.

                      To do this, You will need to modify the format_start on line 5 of the DevDemo.js file to add the multi-line command (Field Block):

                      var format_start = "^XA^LL200^FO80,50^A0N36,36^FB700,5^FD";
                      

                       

                      then the sendData function looks like this:

                      selected_printer.send(format_start + $('#entered_name').val() + "\&" + $('#entered_age').val() + format_end, printComplete, printerError);