Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse Always True #1

Closed
Xndy opened this issue Mar 10, 2020 · 11 comments
Closed

Reverse Always True #1

Xndy opened this issue Mar 10, 2020 · 11 comments

Comments

@Xndy
Copy link

Xndy commented Mar 10, 2020

I am trying to print a text and allways reverse is true and I set to value false and the same.. help me!

@andrey-ushakov
Copy link
Owner

Thank you for reporting this. What's your printer model, please?

@Xndy
Copy link
Author

Xndy commented Mar 10, 2020

Printer: MHT-P26

I commented the line in ticket.dart:

78: bytes += styles.reverse ? cReverseOn.codeUnits : cReverseOff.codeUnits;

But now all underline

2020-03-10

@andrey-ushakov
Copy link
Owner

Thanks, I gonna try to check the issue this week!
At least one other person has reported the same issue. It looks like different printer manufacturers implement ESC/POS commands in a slightly different way...

@Xndy
Copy link
Author

Xndy commented Mar 10, 2020

I have finshed to prove in another print Model ER-80 and all it is ok ... there is not problem... !

@andrey-ushakov
Copy link
Owner

Hi @Xndy,
Thank you for your feedback! I've just updated the library which may fix the underline / reverse issues.

May I ask you to print a few test tickets using both of your printers to check if it helps, please?

@Xndy
Copy link
Author

Xndy commented Mar 11, 2020

All it ok !!

2020-03-11 (1)

@Xndy
Copy link
Author

Xndy commented Mar 11, 2020

Thank you !!!

@andrey-ushakov
Copy link
Owner

Amazing!
If you haven't found any other issues, I'm going to add both models (MHT-P26, ER-80) into the tested printers table.

BTW it seems that the printer on the left doesn't support barcode printing?

@Xndy
Copy link
Author

Xndy commented Mar 11, 2020

I dont know however I can print qr code in this printer ... and aditionally question... is it posible center image ?

final ByteData data = await rootBundle.load('assets/logo.png');
final Uint8List bytes = data.buffer.asUint8List();
final Image image = decodeImage(bytes);
ticket.image(image);

It's align left but i would align center...

@andrey-ushakov
Copy link
Owner

I've just added this feature :)

Now images and barcodes are centered by default, but you can also pass the align parameter for left/right alignment.

BTW, the PosTextAlign enum renamed to PosAlign. You have to rename it in your code if you are using it somewhere.

I hope it helps!

I'm going to close this issue, but feel free to reopen it if you have any further questions or ideas!

@narate1973
Copy link

what OS are you guys testing on ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants