esc_pos_printer
esc_pos_printer copied to clipboard
PosAlign is not working....
when I am using this "printer.text('Align center', styles: PosStyles(align: PosAlign.center));", the text align remain left and it takes a lots of new lines..... what should I do? My printer is Star mC-Print3 series........
Did you find a solution ?
I have the same problem .
When I add an image then everything is centered but without logo it uses only left align
I found out you can use to center align by sending raw data
printer.rawBytes([
0x1B,
0x61,
0x31,
]);
and then if you want to go back to left align you can send
printer.rawBytes([
0x1B,
0x61,
0x30,
]);
Maybe these commands in esc_pos_utils package are wrong? I tried forking it but somehow I was not able to use my changes.
//Print Position
const cAlignLeft = '${esc}a0'; // Left justification
const cAlignCenter = '${esc}a1'; // Centered
const cAlignRight = '${esc}a2'; // Right justification
//Print Position
const cAlignLeft = '$esc\x30'; // Left justification
const cAlignCenter = '$esc\x31'; // Centered
const cAlignRight = '$esc\x32'; // Right justification
correct me if Im wrong. Would be great to hear the author of the package (@andrey-ushakov )