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

I can't print images #125

Open
santosbj opened this issue Oct 24, 2023 · 10 comments
Open

I can't print images #125

santosbj opened this issue Oct 24, 2023 · 10 comments

Comments

@santosbj
Copy link

Hi, i have a problem printing images,

image

Even, after reducing quality, the result is the same.

This is my code.

image

Any idea?...

Thanks for your help.

@Abubakarshaikh
Copy link

What is the Bluetooth Version of your thermal printer device?

@santosbj
Copy link
Author

santosbj commented Nov 1, 2023

Hi, the problem is not Bluetooth device, it's sdk!.
When use:
sdk: '>=2.12.0 <3.0.0'
Everything works great, but, when use:

sdk: '>=2.19.3 <3.0.0'

It happens.

@santosbj
Copy link
Author

santosbj commented Nov 1, 2023

By now, I got solution, using a fork of your project:

https://pub.dev/packages/flutter_esc_pos_utils

@islamroshan
Copy link

Hello Everyone!

I am also struggling for couple of days to fix this issue and after losing 2-3 printer rolls I still wasn't able to fix it.

if someone had a solution, please share.
thanks

WhatsApp Image 2023-11-09 at 11 00 43 AM
WhatsApp Image 2023-11-09 at 4 25 47 AM

@Abubakarshaikh
Copy link

Your printer should have Bluetooth 4.0 or support BLE.

@islamroshan
Copy link

The issue was resolved for me by downgrading the esc_pos_utils_plus package version to 2.0.1+6 in my pubspec.ymal file.

@AhmedTawfiqM
Copy link

@santosbj
i use 2 packages to print an image
flutter_esc_pos_utils: ^1.0.0
flutter_blue_plus: ^1.30.3

but problem is still that is decoded in Papers
please tell me about how u solved the problem ?
my email: [email protected]
linkedin:
https://www.linkedin.com/in/ahmed-tawfiiq/

@Cannon99
Copy link

I solved this using https://pub.dev/packages/flutter_esc_pos_utils_v2.

@iOSyan
Copy link

iOSyan commented Sep 5, 2024

@santosbj i use 2 packages to print an image flutter_esc_pos_utils: ^1.0.0 flutter_blue_plus: ^1.30.3

but problem is still that is decoded in Papers please tell me about how u solved the problem ? my email: [email protected] linkedin: https://www.linkedin.com/in/ahmed-tawfiiq/

Hello, have you solved this problem now? I also use 2 packages to print an image
flutter_esc_pos_utils
flutter_blue_plus
Pictures can be printed, but printing is very slow and too laggy.
May I ask if there is a new solution? be deeply grateful!

@santosbj
Copy link
Author

santosbj commented Sep 5, 2024

Hi,

I'm using:
flutter_esc_pos_utils: ^1.0.0
print_bluetooth_thermal: ^1.1.1
` ...

final imageBytes =
    base64.decode(logoData.replaceAll("data:image/png;base64,", "").trim());

var image = decodeImage(imageBytes);
var bytes = generator.image(image!, align: PosAlign.center);

bytes += generator.reset();

...
`

That's working for me.

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

6 participants