another_brother icon indicating copy to clipboard operation
another_brother copied to clipboard

P710BT only prints square labels

Open travishaagen opened this issue 1 year ago • 4 comments

Hello!

I have a PT_P710BT with W24 label, am running on iOS, and am only able to print labels that are square (24x24). I'm trying to print shorter labels (12 mm).

I followed the advice from https://github.com/CodeMinion/another_brother/issues/40 and am rendering my own image. The final image dimensions are:

ui.PictureRecorder recorder = ui.PictureRecorder();
Canvas canvas = Canvas(recorder);
// ...
final printImage = await recorder.endRecording().toImage(1000, 500)

await printer.printImage(printImage);

None of the custom paper settings change the output.

Any suggestions?

travishaagen avatar May 24 '24 18:05 travishaagen

Hi @travishaagen ,

Thanks for reaching out about this. In order to print to one of the PT printer you'll need to specify the paper using the PT label. You may find an example here (https://github.com/CodeMinion/Demo-Another-Brother-Prime/blob/master/lib/main.dart#L559) for printing to the PT-P910BT model that you should be able to follow for your case. All you'll have to do is replace the printer model and the port to match the connection you are using along with a label matching the one you are using.

Hope this helps but don't hesitate to reach out if you run into any other issues.

CodeMinion avatar May 26 '24 15:05 CodeMinion

These are the settings that result in square output for me. I've tried many other combinations too :)

    var printer = Printer();
    var printInfo = PrinterInfo();
    printInfo.printerModel = Model.PT_P710BT;
    printInfo.printMode = PrintMode.FIT_TO_PAGE;
    printInfo.isAutoCut = true;
    printInfo.isCutAtEnd = true;
    printInfo.isHalfCut = false;
    printInfo.port = Port.BLUETOOTH;
    printInfo.labelNameIndex = PT.ordinalFromID(PT.W24.getId());
    await printer.setPrinterInfo(printInfo);

travishaagen avatar May 27 '24 21:05 travishaagen

Hi @travishaagen ,

Thanks for the print settings. Could we trouble to share a picture of the print in order to get a better idea?

Thanks in advance,

CodeMinion avatar Jun 02 '24 14:06 CodeMinion

Have the same issue on iOS: on the top is the result if resolution is normal, on the bottom if resolution is high. Image 2

full printer info settings:

  final printInfo = PrinterInfo(
    printerModel: Model.PT_P750W,
    printQuality: Platform.isIOS ? PrintQuality.NORMAL: PrintQuality.HIGH_RESOLUTION,
    isAutoCut: false,
    isHalfCut: true,
    isCutAtEnd: false,
    port: Port.NET,
    orientation: Orientation.LANDSCAPE,
    labelNameIndex: PT.ordinalFromID(PT.W24.getId()),
  )

Next issue is that iOS do not respect isAutoCut param. Cut label every image, Android works good.

Artur512 avatar Aug 31 '24 20:08 Artur512