thon-ju / bluetooth_print

a flutter plugin connect to bluetooth thermal printer support both Android and IOS (eg. Gprinter pt-380态gp-1324态gp-2120)
MIT License
149 stars 193 forks source link

LineText params not working synchronously in Android and iOS #94

Open Musaddiq625 opened 2 years ago

Musaddiq625 commented 2 years ago

params:

size

  • Android :x:
  • iOS :heavy_check_mark:

weight

  • Android :heavy_check_mark:
  • iOS :x:

width

  • idk why the param is there, its not working

x,y axis

  • On same x-axis value in the list, It takes alignment value of last same value of x-axis param of the list

image

  • It doesnt have any option to set size of image

For now found these issues I need to remove size and weight param from both Android and iOS sides code to make it work synchronously.

Although the package is so good Ive used some other packages too, they dont have the support of iOS.

This package needs some update.

Musaddiq625 commented 2 years ago

@xni06

xni06 commented 2 years ago

Some of these issues may/should have been addressed in the PR's that have not yet been merged - see #77 #79 #80 #83.

You can also try my fork that is the source of those PR's:

Use something like this in your pubspec.yaml

  bluetooth_print:
    git:
      url: https://github.com/foresightmobile/bluetooth_print.git
      ref: '44e3c58'
javieritis commented 1 year ago

Some of these issues may/should have been addressed in the PR's that have not yet been merged - see #77 #79 #80 #83.

You can also try my fork that is the source of those PR's:

Use something like this in your pubspec.yaml

  bluetooth_print:
    git:
      url: https://github.com/foresightmobile/bluetooth_print.git
      ref: '44e3c58'

Thanks for your fork! One question, it's possible update it with the last changes or we can use the last version "4.3.0" of the base bluetooth_print?

xni06 commented 1 year ago

@javieritis

Thanks for your fork! One question, it's possible update it with the last changes or we can use the last version "4.3.0" of the base bluetooth_print?

As those PR's have now been merged, you might as well use this repo instead of the fork. FYI, the fork has some additional commits but they are specific to a particular application so may not be of relevance to you. If I were you, I'd use https://github.com/thon-ju/bluetooth_print as the fork may disappear at some point.

javieritis commented 1 year ago

Each day that I use this SDK, I'm finding more bugs šŸ˜” . Thanks!

xni06 commented 1 year ago

Each day that I use this SDK, I'm finding more bugs šŸ˜” . Thanks!

LOL! I feel your pain! I battled with this repo during the winter of 2021 and managed to implement the missing functionality that we required for the project that I was working on at the time. I'm glad that's over with but fully aware that there will be lots more holes left unfilled - good luck!

patelnirav48 commented 1 year ago

@xni06 I was using your changes with below, but now when i upgrade its not working. Its printing but next label print start exactly after last printed instead of next label. Could you please suggest.

bluetooth_print: git: url: https://github.com/foresightmobile/bluetooth_print.git ref: '44e3c58'

xni06 commented 1 year ago

Hi @patelnirav48 - I no longer work in this area so I'm unable to help, sorry. By the way, you should be using the real repo now, not the forked one.

> As those PR's have now been merged, you might as well use this repo instead of the fork. FYI, the fork has some additional commits but they are specific to a particular application so may not be of relevance to you. If I were you, I'd use https://github.com/thon-ju/bluetooth_print as the fork may disappear at some point.

patelnirav48 commented 1 year ago

@xni06 Thank yoi for your reply, however if you atleast give some hints that solve my problem will really be great.

this was working fine earlier but now by upgrading its not working. Labels prints just after last label printer instead of next label. Appriciate if you can help me on this šŸ™

xni06 commented 1 year ago

@xni06 Thank yoi for your reply, however if you atleast give some hints that solve my problem will really be great.

this was working fine earlier but now by upgrading its not working. Labels prints just after last label printer instead of next label. Appriciate if you can help me on this šŸ™

What did you upgrade?

patelnirav48 commented 1 year ago

@xni06 I did pub upgrade and my customised code in PrintContent.java, i did in past erased. Not sure what changes i had made that were works perfectly. I made some changes here to print image https://prnt.sc/30ffuZo4n17A.

And now im getting error like width and height must be > 0, however i resolved that error by passing width to linetext https://prnt.sc/B-XsogmQYwgt, but label always start after last print stopped. not from new label.

xni06 commented 1 year ago

@xni06 I did pub upgrade and my customised code in PrintContent.java, i did in past erased. Not sure what changes i had made that were works perfectly. I made some changes here to print image https://prnt.sc/30ffuZo4n17A.

And now im getting error like width and height must be > 0, however i resolved that error by passing width to linetext https://prnt.sc/B-XsogmQYwgt, but label always start after last print stopped. not from new label.

I suggest trying previous versions of this repo until it works to track down the breaking change.

patelnirav48 commented 1 year ago

@xni06 Thanks, trying that since last week, but when i pick any ref commit its taking 4.3.0 of bluetooth print version. So not resolving yet.

Just a question, even i pass width 40mm and height 30mm bases on my label with gap 2, why its not goes to perfect postion of next label?

Thanks!