CodeMinion / another_brother

Another Brother Flutter SDK
BSD 3-Clause "New" or "Revised" License
21 stars 19 forks source link

printPdfFile on ios #46

Open gmorva-wunder opened 1 year ago

gmorva-wunder commented 1 year ago

Hi,

There seems to be some complication when printing pdf files from ios.
Using the same code, whenever I print from android, the pdf looks right, but when doing the same thing from ios, it gets squeezed vertically, making everything distorted.

Here's the PrinterInfo I'm using:

final printerInfo = PrinterInfo(
      printerModel: Model.QL_820NWB,
      port: Port.NET,
      printMode: PrintMode.FIT_TO_PAPER,
      ipAddress: settings.ip,
      printQuality: PrintQuality.HIGH_RESOLUTION,
      labelNameIndex: QL700.ordinalFromID(QL700.W62.getId()),
    )

Here's a picture of the result: image

If any more information is needed, I'll create a minimal reproduction code and give the extra details.

Could you help in resolving this issue? Thanks!

grendes-wunder commented 1 year ago

Hey @CodeMinion : do you have any idea why this happens? Is this a configuration issue, or does it require some tweak within this plugin's iOS part? Any hint / info would be appreciated :)

CodeMinion commented 1 year ago

Hi @gmorva-wunder ,

Apologies for the late reply on this. At a glance it looks correct so it's hard to know what could be causing it.

I do remember a while back there being an issue with the resolution setting on iOS. Could I trouble you try printing with a different resolution and seeing if you still get the same result as in the picture?

Thanks in advance,

gmorva-wunder commented 1 year ago

Hi @CodeMinion

Thanks for the help! It seems only to happen with PrintQualty.HIGH_RESOLUTION.

Marcelo-Petrucelli commented 1 year ago

I can confirm that this issue does happen and only on PrintQuality.HIGH_RESOLUTION

CodeMinion commented 1 year ago

Hi @Marcelo-Petrucelli ,

Thanks for confirming, this seems to be a bug in the iOS sdk as all resolutions follow the same path on another_brother. But will keep an eye out for it.

Thanks again,

renrutsirhc commented 2 months ago

Hi @CodeMinion! Has there been any updates from brother re this issue? My colleague @brenn08 and I are experiencing this issue currently. Thanks so much!

CodeMinion commented 2 months ago

Hi @renrutsirhc ,

Thanks for reaching out about this.

We've looked at the implementation and currently this seems to be a bug in the native iOS library. If that proves to be the case, the only course of action is to not print in high resolution until we get a new drop of the iOS lib from Brother.

renrutsirhc commented 2 months ago

Thanks @CodeMinion. My colleague @brenn08 has reported the IOS SDK issue to brother. Will update this thread when we hear anything.

SoCaliOS commented 1 month ago

Personally I never have any problems with the print quality, whether TD, RJ, QL, PT, PJ or MW printers. I always allow users to set the halftone (Threshold, Patterndither, or Errordiffusion) where threshold will yield the best quality for text or simple graphics, and error diffusion will work on most cases, and pattern dither will work best for photographic images.

It also appears that Brother basically only support 2 resolutions, no matter what other options you chose: Normal or Best or Fast. The default is Best, which is the same as NORMAL and HIGHRESOLUTION. One of the comment indicated that there is a way to increase the quality by setting the rjDensity (i.e. printInfo.rjDensity = 8;). I am unsure why only RJ has this setting. I look into additional SDK information. It appears that there maybe a BRLMPrintSettingsResolution where you can set to low, normal, and high.

Anyway, I am happy with current quality without this additional resolution setting. Also, keep in mind that Brother printers have different dpi, mostly at 300dpi for the QL, 203 or 300 dpi for the PJ, RJ and TD, 160 to 360 dpi for the PT, and 300dpi for the MW.

another_brother did a fantastic job supporting 99% of the SDK and made them super easy to use for both Android and iOS. My iOS app will also run on macOS using silicon, which is awesome!