Hi,
I tried to adapt the text send to bitmap. Taking the text sample as base, as resquested tryed change the TextWriter to AsyncStreams with no luck... Now I'm not getting any response from the printer.
For now I´m just focusing in print something, but the idea it's send a bitmap data and print (commented on the code).
Can a expert in B4A help with this sample?
I tried to adapt the text send to bitmap. Taking the text sample as base, as resquested tryed change the TextWriter to AsyncStreams with no luck... Now I'm not getting any response from the printer.
For now I´m just focusing in print something, but the idea it's send a bitmap data and print (commented on the code).
B4X:
printerA.Initialize(cmp20.InputStream,cmp20.OutputStream,"PrinterA")
printerA.Write(Array As Byte(0x1B, Asc("a"), 1))
printerA.Write(Array As Byte(0x1D, Asc("*"), imagem.Width/8, imagem.Height))
For x = 1 To imagem.Width/8 -1
printerA.Write(Array As Byte(255))
Next
'Log(PrintBuffer)
printerA.Write(Array As Byte(0x1D, Asc("/"), Asc("0")))
printerA.Write(Array As Byte(0x1B, Asc("a"), 1))
Can a expert in B4A help with this sample?
Attachments
Last edited: