TextWriter problem

asigala

Member
Licensed User
Longtime User
Hi, I have a bluetooth connection with a printer. Then I start and Activity to get the data I want to print.

After I concatenate all the data in a String Var I made the following:

B4X:
Dim impresora As TextWriter
impresora.Initialize(Main.sManager.OutputStream)
impresora.WriteLine(pagina)
impresora.Flush
impresora.Close
   
Activity.Finish
   
StartActivity(Main)

The question is, Why the printer do not print all the data? It stops at the middle :BangHead:
 
Last edited:

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Not sure if this will help you.

But when I connect to my Bluetooth printer (HP DeskJet 100 Mobile) I am using the OutputStream from the Bluetooth Connection

OutputStream has WriteBytes, I needed to use this because I am sending a lot of control characters to the printer to change fonts, do Raster graphics, etc and the TextWriter I think was eating the characters values over 128

BobVal
 
Upvote 0
Top