SD: BT Printer Bluetooth

Hello is there any improvement?
After doing a search I found how to print the characters of different sets. I attach the example of Chinese:

Initialize the printer with this encoding
B4X: Copy
Printer.Initialize(Me,"Printer","GB2312")

Precede the Chinese text with chr (27) + chr(64)
B4X: Copy
Printer.AddBuffer_WriteLine(Chr(27) & Chr(64) & "艾德蒙 AOC E2450SWH 23.6吋")

see this link
 
After doing a search I found how to print the characters of different sets. I attach the example of Chinese:

Initialize the printer with this encoding
B4X: Copy
Printer.Initialize(Me,"Printer","GB2312")

Precede the Chinese text with chr (27) + chr(64)
B4X: Copy
Printer.AddBuffer_WriteLine(Chr(27) & Chr(64) & "艾德蒙 AOC E2450SWH 23.6吋")

see this link
6447a0b7-9f35-4c13-bcfd-cf78e10c24f5.jpg


Hello, I am having this problem too. It doesn't print all Turkish characters. Only ( Ç , ü , Ö , Ü ) printing these characters.
I want to write in the first line ( Çilek , Ördek , Ağaç ) but does not print ( Ç Ö ğ)
"Ş, İ, Ö, Ç, Ü, Ğ, ş, ı, ö, ç, ü, ğ" I want to print these letters. I've been researching for this for a few months but I couldn't figure it out.

Can you help me to solve this event?

B4X: Copy
Printer.Initialize(Me,"Printer","iso-8859-9")
 
Last edited:
After doing a search I found how to print the characters of different sets. I attach the example of Chinese:

Initialize the printer with this encoding
B4X: Copy
Printer.Initialize(Me,"Printer","GB2312")

Precede the Chinese text with chr (27) + chr(64)
B4X: Copy
Printer.AddBuffer_WriteLine(Chr(27) & Chr(64) & "艾德蒙 AOC E2450SWH 23.6吋")

see this link
WhatsApp Image 2020-07-02 at 17.13.16.jpeg


I choose Turkish option in the settings section of this application. It's using TrueTpye font.
The printer prints these characters. How can we activate this event in the library?
 
Hi @Ertan ,
The problem is probably related to your printer. I did the tests with mine and here are the results

B4X: Copy
Printer.Initialize(Me,"Printer","GB2312")

B4X: Copy
Printer.ClearBuffer
    Printer.AddBuffer_Writeline(ESC_POS.BoldOn & "Hallo dear" & ESC_POS.DoubleOff)
    Printer.AddBuffer_Writeline("How are you?")
    Printer.AddBuffer_Writeline("Fine thank's")
 
    Printer.AddBuffer_WriteLine("打印中文")
    Printer.AddBuffer_WriteLine("艾德蒙 AOC E2450SWH 23.6吋")


PS: Chinese = "GB18030"; Turkish = "GB2312"

1594099458640.png
 
Last edited:
I am trying you lib, but I get this missing properties in the demo:
Unknown member: flushAllAndClose
Unknown member: Preview.Height, Panel.Height

sd_printer1.jpg
 
Hi, How can print Greek Characters ?
It all depends on whether the printer contains this character set.
If the manual supports it, you must select the CODCE PAGE to activate the chosen character set
 
View attachment 96512

I choose Turkish option in the settings section of this application. It's using TrueTpye font.
The printer prints these characters. How can we activate this event in the library?
I tested it for a project today and it worked.
The problem is all about the character set of the printer.
if you too " ğ, Ğ, ş, Ş, ı, İ , ü, Ü, ö, Ö, ç, Ç " you want to print letters;
B4X: Copy
Printer.Initialize(Me,"Printer","IBM857")
You should use IBM857.
Remember, if your printer still doesn't print these characters, you should correct this in your printer settings.
 
Update Rel.0.18
  • Add event: DataReceived(Buffer() As Byte)
  • Add new ESC_POS command: QueryPrinterStatus, QueryOfflineCauses, QueryErrorCauses, QueryPaperStatus
 
Last edited:
Hi:

DataReceved() is use in which cases???

Thanks!
Some printers if you send certain commands tell you the status of the printer or if it is out of paper or other errors
 
Is there a way to set paper size, my app works fine but if i send to print more than 2 labels(paper) it starts to jump spaces
 
Each label sends to the printer. It could be a buffer problem
 
To speed up processing I just placed the command: Printer.SelectFromMac("00:08:1B:95:42:BD") in B4A and the flow goes to Printer_ConnectedToPrint (Success As Boolean) as true.

1. In B4J (Printer.SelectFromMac("00081B9542BD")) it doesn't work, I have to search first. Is it possible to connect directly without have to search the device?
2. Is it possible to keep printing from both devices -Mobile and PC? . Do I have to logout the printer with "close" and search the printer again when I change the sender?

Tks a lot for the reply
 
Back
Top