esc_pos_bluetooth icon indicating copy to clipboard operation
esc_pos_bluetooth copied to clipboard

Print word in a "New Line" instead of breaking the word.

Open tehsunnliu opened this issue 3 years ago • 3 comments

Hi, I'm facing some issues while printing longer text. For example, if I try to print Old MacDonald Had A Farm it prints like

Old MacDonald Ha
   d A Farm
final Ticket ticket = Ticket(PaperSize.mm58);
ticket.text('Old MacDonald Had A Farm',
          styles: PosStyles(align: PosAlign.center));

Is there any way I can print Had to a new line instead of splitting the word? like

  Old MacDonald
   Had A Farm

Thank you.

tehsunnliu avatar May 10 '21 09:05 tehsunnliu

have you tried using \n to break a line?

renanzdm avatar Jun 10 '21 23:06 renanzdm

I have same issue. I need auto wrap text with correct position.

ozhankucuk avatar Jul 12 '21 15:07 ozhankucuk

Hi, what I did was, based on the font and number of characters it can hold per line, I add \n in-between the sentence.

tehsunnliu avatar Jul 12 '21 15:07 tehsunnliu