Android Question Not able to print image using SD BT Printer lib

microbox

Active Member
Licensed User
Longtime User
Hi, I'm using SD BT Printer lib and using the given example. I'm able print text with no problem but no success with image( qr code). I tried to resize it using
B4X:
Printer.AddBuffer_Bitmap(LoadBitmap(File.DirAssets,"qr.jpg").Resize (100, 100, True),0)
But prints out like garbage characters.
 

Star-Dust

Expert
Licensed User
Hi, I'm using SD BT Printer lib and using the given example. I'm able print text with no problem but no success with image( qr code). I tried to resize it using
B4X:
Printer.AddBuffer_Bitmap(LoadBitmap(File.DirAssets,"qr.jpg").Resize (100, 100, True),0)
But prints out like garbage characters.
Can you print the qr code of the example?

In the first posts there is an example source. I always recommend that you first use that code and do all the tests to check compatibility with your printer
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Can you print the qr code of the example?
This is the code I'm using to print
B4X:
Sub RadioButtonMIX_CheckedChange(Checked As Boolean)
    Printer.ClearBuffer
    Printer.AddBuffer_Writeline("TEST - Mixed Text and Image")
    Printer.AddBuffer_Writeline("012345678901234567890123456789-F")
    'Printer.AddBuffer_Bitmap(LoadBitmap(File.DirAssets,"qr.jpg"),0)
    Printer.AddBuffer_Bitmap(LoadBitmap(File.DirAssets,"qr.jpg").Resize (100, 100, True),0)
    Printer.AddBuffer_Writeline("END PRINT")
    Preview.Panel.Height=Printer.Preview.Height
    Preview.Panel.SetBackgroundImage(Printer.Preview)
End Sub
I'm not able to print the image in the given example. But prints the text with no problem.
 
Upvote 0

Star-Dust

Expert
Licensed User
try the example contained in this post and see if it prints the image. Use the example without changing it

 
Upvote 0

Star-Dust

Expert
Licensed User
Maybe I expressed myself badly. try the example contained in this post and see if it prints the image. Use the example without changing it.
If it prints then the library is compatible with your printer. Otherwise it is not

 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Unfortunately it did not print out correctly. This is the output.
BTPri.png
 
Upvote 0
Top