Closed ApiwatProject closed 2 years ago
Hello,
Yes it's because your printer required to set the label size, until now it was only possible in this lib for the QL serie (the one I used). I just add label size the PT serie.
Can you try to use the master branch and test by passing a BrotherLabelSize
parameter and check if it works.
I use in master branch package and add BrotherLabelSize PT12mm but still error wrong label.
Are you sure your paper is 12mm and you're passing the labelSize to printPDF
method.
I have no other idea about what the problem could be and I cannot find it without the printer.
In printerSession.java I see only ql series to validate label size but not have tp series. Could you check that please.
Sorry I forgot Android. Try again. I have to upgrade to the new version of the SDK for android but it requires a lot of time to rewrite everything.
It work!!!!!!!!!!!! . Thank for fixing. I appreciate you to make this library. it save a lot of time.
I just released a new version 0.1.5.
My brother print model is PT-P950NW, I don't know why it can't print . Here it is my code to print to brother PT-P950NW
//this is pdf file File? qrCodeLabel;
Future printImage() async {
DialogList().loadingDialog();
BrotherDevice? brotherDevice;
await BrotherPrinter.searchDevices(searchOnIPv6: true)
.whenComplete(() => DialogList().closeLoading())
.then((value) async {
print("find printer : ${value.length}");
brotherDevice = value[0];
});
if (brotherDevice != null) {
await BrotherPrinter.printPDF(
path: qrCodeLabel!.path,
device: brotherDevice!,
);
}
}