I'm doing a mobile app using ionic 1, and for printing in thermal printers I'm using the cordova-plugin-datecs-printer plugin.
Everything works ok except with the word wrapping. The printer cut words at the end of the line. Is there a way to adjust or enable word wrap to avoid incomplete words?
Here is my code:
tale += '{center}{b}Le Petit Prince{/b}{br}{br}';
tale += '{left}Once when I was six years old I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest. It was a picture of a boa constrictor in the act of swallowing an animal. Here is a copy of the drawing.&n the book it said: "Boa constrictors swallow their prey whole, without chewing it. After that they are not able to move, and they sleep through the six months that they need for digestion.';
//Replace & with line breaks
var text1 = tale.replace(/&/g, '{br}{br}');
cordovaPrinter.printText(text1);
And this is the result: :(