B buras3 Active Member Licensed User Longtime User Jul 14, 2016 #1 Hello Is it possible to send text to printer by Wifi or Bluetooth ? Tanks Michael
DonManfred Expert Licensed User Longtime User Jul 14, 2016 #2 https://www.b4x.com/android/forum/pages/results/?query=Print&page=1&prefix=0 Upvote 0
B buras3 Active Member Licensed User Longtime User Jul 14, 2016 #3 I need to send without a computer It's for a shop to print stickers Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 15, 2016 #4 Start with this tutorial: https://www.b4x.com/android/forum/threads/bluetooth-printing-via-spp.17692/#content Upvote 0
Start with this tutorial: https://www.b4x.com/android/forum/threads/bluetooth-printing-via-spp.17692/#content
B buras3 Active Member Licensed User Longtime User Jul 20, 2016 #5 Tank you But I can't find printer with Bluetooth I did find with wifi is it possible to convert this code to b4a ? or send to this app intent ? https://play.google.com/store/apps/details?id=com.brother.ptouch.iprintandlabel&hl=en <how to show this ?> 2.2.5.Sample code for supporting Wi-Fi Import the library into source code. import com.brother.ptouch.sdk.Printer; import com.brother.ptouch.sdk.PrinterInfo; import com.brother.ptouch.sdk.PrinterStatus; import android.hardware.usb. LabelInfo; The sample of print function public void print(){ Thread trd = new Thread(new Runnable(){ @override public void run() { String externalStorageDir = Environment.getExternalStorageDirectory().toString(); //print setting Printer printer = new Printer(); PrinterInfo printInfo = new PrinterInfo(); printInfo.printerModel = PrinterInfo.Model.PT_P750W; printInfo.port = PrinterInfo.Port.NET; printInfo.ipAddress = "172.0.0.1"; printInfo.labelNameIndex = LabelInfo.PT.W24.ordinal(); printer.setPrinterInfo(printInfo); </how to show this ?> Tank you Upvote 0
Tank you But I can't find printer with Bluetooth I did find with wifi is it possible to convert this code to b4a ? or send to this app intent ? https://play.google.com/store/apps/details?id=com.brother.ptouch.iprintandlabel&hl=en <how to show this ?> 2.2.5.Sample code for supporting Wi-Fi Import the library into source code. import com.brother.ptouch.sdk.Printer; import com.brother.ptouch.sdk.PrinterInfo; import com.brother.ptouch.sdk.PrinterStatus; import android.hardware.usb. LabelInfo; The sample of print function public void print(){ Thread trd = new Thread(new Runnable(){ @override public void run() { String externalStorageDir = Environment.getExternalStorageDirectory().toString(); //print setting Printer printer = new Printer(); PrinterInfo printInfo = new PrinterInfo(); printInfo.printerModel = PrinterInfo.Model.PT_P750W; printInfo.port = PrinterInfo.Port.NET; printInfo.ipAddress = "172.0.0.1"; printInfo.labelNameIndex = LabelInfo.PT.W24.ordinal(); printer.setPrinterInfo(printInfo); </how to show this ?> Tank you
DonManfred Expert Licensed User Longtime User Jul 20, 2016 #6 buras3 said: But I can't find printer with Bluetooth I did find with wifi Click to expand... the printer seems to be a WIFI printer, not a Bluetooth printer.... Which model do you have exactly? Upvote 0
buras3 said: But I can't find printer with Bluetooth I did find with wifi Click to expand... the printer seems to be a WIFI printer, not a Bluetooth printer.... Which model do you have exactly?
DonManfred Expert Licensed User Longtime User Jul 20, 2016 #7 buras3 said: is it possible to convert this code to b4a ? Click to expand... which code? You did not posted a code here. just a link to an app Upvote 0
buras3 said: is it possible to convert this code to b4a ? Click to expand... which code? You did not posted a code here. just a link to an app
B buras3 Active Member Licensed User Longtime User Jul 20, 2016 #8 I did post java code link to app https://play.google.com/store/apps/details?id=com.brother.ptouch.iprintandlabel&hl=en sdk link http://www.brother.com/product/dev/mobile/android/index.htm the printer http://support.brother.com/g/b/manu...g=en&prod=lpql720nweuk&flang=English&type2=81 Upvote 0
I did post java code link to app https://play.google.com/store/apps/details?id=com.brother.ptouch.iprintandlabel&hl=en sdk link http://www.brother.com/product/dev/mobile/android/index.htm the printer http://support.brother.com/g/b/manu...g=en&prod=lpql720nweuk&flang=English&type2=81
imbault Well-Known Member Licensed User Longtime User Jul 20, 2016 #9 Good luck wraping this big lib... Maybe easier to use ESC/POS commands Upvote 0
B buras3 Active Member Licensed User Longtime User Jul 20, 2016 #10 can you explain this? Maybe easier to use ESC/POS commands Upvote 0
imbault Well-Known Member Licensed User Longtime User Jul 20, 2016 #11 https://www.b4x.com/android/forum/pages/results/?query=ESC/POS&page=1&prefix=0 Upvote 0
B buras3 Active Member Licensed User Longtime User Jul 20, 2016 #12 Tank you So is it possible to connect printer to USB and print from the tablet (without computer) with this ESC/POS commands ? Upvote 0
Tank you So is it possible to connect printer to USB and print from the tablet (without computer) with this ESC/POS commands ?
B buras3 Active Member Licensed User Longtime User Jul 20, 2016 #13 ESC/POS commands is just for Epson printers? Upvote 0
imbault Well-Known Member Licensed User Longtime User Jul 20, 2016 #14 At the beginning yes, now it's a std for recept printers like yours Upvote 0
B buras3 Active Member Licensed User Longtime User Jul 20, 2016 #15 but i need sticker for shipping it's the same? I haven't seen esc/pos in the Sdk Last edited: Jul 20, 2016 Upvote 0
imbault Well-Known Member Licensed User Longtime User Jul 20, 2016 #16 I think so, have a look at http://download.brother.com/welcome/docp000706/cv_ql720_eng_escp_100.pdf The ESC/p doc of your printer Upvote 0
I think so, have a look at http://download.brother.com/welcome/docp000706/cv_ql720_eng_escp_100.pdf The ESC/p doc of your printer
B buras3 Active Member Licensed User Longtime User Jul 24, 2016 #17 Tank you very much But I don't know how to connect to the printer Is there a simple way for me to print from an app ? I need to buy a shipping label printer and i don't know what to buy it's very urgent Upvote 0
Tank you very much But I don't know how to connect to the printer Is there a simple way for me to print from an app ? I need to buy a shipping label printer and i don't know what to buy it's very urgent
imbault Well-Known Member Licensed User Longtime User Jul 24, 2016 #18 You need to print label? right Upvote 0
B buras3 Active Member Licensed User Longtime User Jul 24, 2016 #19 yes around 7-12 cm * 7-12cm Upvote 0
imbault Well-Known Member Licensed User Longtime User Jul 24, 2016 #20 Do you need the printer to be portable, with batteries ? or not Upvote 0