Thank you. With this demos i can Print Text, Image and Mix.I updated the example at post # 1
German characters can be set. Unfortunately, I do not have a bluetooth printer at the moment. I made the blind library (so to speak) but it works from 2017.Thank you. With this demos i can Print Text, Image and Mix.
Nice one. But unfortunately only a-zA-Z0-9. German "Umlauts" (äöüÄÖÜß) does not work with all three Encodings.
I´m pretty sure the problem is this f*** chinese Printer (grrr)...
But really nice library and examples! Good work.
No difference, I copied the same example twice.Hi, what's the difference between sample1 and sample2?
' Set Codepage to 6
Printer.AddBuffer_ArrayByte(Array As Byte(0x1f,0x1b,0x1f,0xff,0x06))
Printer.AddBuffer_Writeline("#0x06: äöüÄÖÜß")
Printer.AddBuffer_Writeline("Umlaute Hähnchen, Brühe, Örtlichkeit, Süße ")
Printer.AddBuffer_Writeline("äöüÄÖÜß")
' Underline 2px thick
Printer.AddBuffer_ArrayByte(Array As Byte(0x1b,0x2d,0x02))
Printer.AddBuffer_Writeline("Underline 2 TEST - Mixed Text and Image")
' Underline 1px thick
Printer.AddBuffer_ArrayByte(Array As Byte(0x1b,0x2d,0x01))
Printer.AddBuffer_Writeline("Underline 1 TEST - Mixed Text and Image")
' Underline 0px thick (off)
Printer.AddBuffer_ArrayByte(Array As Byte(0x1b,0x2d,0x00))
Printer.AddBuffer_Writeline("Underline 0 TEST - Mixed Text and Image")
Sir,I'm happy to present the update to version 0.15. I have also updated the examples to post#1
- Now the list of printers and MacAddr in a Map.
- The new version (FlushAndClose) will give you 14 days of trial from the installation.
- It is possible to store an image in the printer and recall it without having to transfer it every time.
2Download the latest version of the library and try again. The problem should not arise
However remember that for your printer my library is not good, because it is suitable for printed bluetooth, not dot matrix printers with bluetooth adapters.
A bluetooth receiver is not enough to make the bluetooth printer. In your case you need to develop a special library that transmits commands for the needle printer through the bluetooth.
main_imprimirtest (java line: 553)
java.io.IOException: [JSR82] write: write() failed.
at android.bluetooth.BluetoothSocket.write(BluetoothSocket.java:702)
at android.bluetooth.BluetoothOutputStream.write(BluetoothOutputStream.java:85)
at java.io_OutputStreamWriter.flushBytes(OutputStreamWriter.java:167)
at java.io_OutputStreamWriter.flush(OutputStreamWriter.java:158)
at java.io.BufferedWriter.flush(BufferedWriter.java:124)
at anywheresoftware.b4a.objects.streams.File$TextWriterWrapper.Flush(File.java:602)
Hi..sir, I want to give regional font printing at point of sale.2
Ok. I tried. Now demo is working ok.
I will test it for my app and if any query will contact u..
Thanx
Hi,Hi..sir, I want to give regional font printing at point of sale.
using Serial library gives printing in english text but not in regional font as bluetooth printer does not support.
So I thought that printing screenshot or lables (with regional font characters on it) will be better choice.
I also thought that using your library with xui will give desired result.
I tested your library. It is ok.
But I want to print image. I mean I want to use your library for pos receipt printing with regional fonts in which i will print label (or labels) of different sizes and with texts.
So with the support of xui library, I took snapshot of label on which i managed to fetch local font data from database and want that label to be printed as it is.... as an image... so that i could print receipt in regional font.
I tried this with your QR code. I replaced your QR code image with my label of same size. It printed not accurate.. but not bad.... It was OK.. with some distorted characters.
But when tried to print snapshot of different sizes, it printed garbage.
So what to do for printing of snapshot as it is.... or printing labels of different sizes on receipt?
My receipt, either it will be screenshot of activity or
it will be having different fields (lables)
whichever will be easier.....
Will you please guide me for this???
Hi,
The images must be of a width space that does not exceed that of your printer, otherwise the commands are incorrectly translated and appear written in ASCII characters.
Sir, I want to print indian language (devnagari) characters with blu
The images also do not have to be too big otherwise the bluetooth will not be able to transmit everything correctly. Then suggest images that represent one line of text at a time.
Unfortunately, you're trying to do something that has not been done by many at the moment, so you'll be the first to experiment.
Sir,Hi,
The images must be of a width space that does not exceed that of your printer, otherwise the commands are incorrectly translated and appear written in ASCII characters.
The images also do not have to be too big otherwise the bluetooth will not be able to transmit everything correctly. Then suggest images that represent one line of text at a time.
Unfortunately, you're trying to do something that has not been done by many at the moment, so you'll be the first to experiment.
I'm sorry at the moment I can not help you I'm making several libraries. On the other hand I'm creating the iOS version of this library and it's very complex because it uses BLE.Sir,
My main concern is to print in indian language fonts with bluetooth printer.
Thats is why i am trying all this.
Because so far from what I understood, I can not do this with text printing as it only supporting english and those languages which are supported in printer code pages.
Here in 'stackoverflow' post in which i found the suggestion for what to do...
Here is the sugesstion.....
----
"Printers have predefined character sets built in. These character sets are known as code pages.
Your Bluetooth printer, like most POS printers doesn't seem to support Unicode.
To solve this you could try converting your output to an image and send it to the printer as bytes using an emulation the printer understands.(PCL, ESC/POS, ZPL etc.)"
But i do not know how to do...because i do not know java, bytes arrey concepts etc..
Sir, as I tested, your library is worth to purchase but if you give me this solution, many other indian b4a users will also be benefited.
Kindly include above said functionality in your library.
There is no need to add anything to the Library.Sir, as I tested, your library is worth to purchase but if you give me this solution, many other indian b4a users will also be benefited.
Kindly include above said functionality in your library.
Already Erel has suggested him to use SnapShot views (Label) but fails.There is no need to add anything to the Library.
Use an Canvas to draw your text on and create a snapshot from the Canvas. Print this snapshotimage then.
You don´t need java knowledge for this. Just B4A.
If you are not able to do it then you should create a new thread in the Questionsforum about it.
Already Erel has suggested him to use SnapShot views (Label) but fails.
So I suppose the problem can be more complex, also because for several weeks fighting on it ... maybe it needs something ready that I can not do
I drew text. Took snapshot.There is no need to add anything to the Library.
Use an Canvas to draw your text on and create a snapshot from the Canvas. Print this snapshotimage then.
You don´t need java knowledge for this. Just B4A.
If you are not able to do it then you should create a new thread in the Questionsforum about it.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?