Zebra Browser Print line break, how to?

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

Marcos Ferreira
I forgot to mention printer

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Marcos, There are several

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Marcos Ferreira
Hi!Well i have tried in some

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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Marcos, Thanks. To do this

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);

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments