# Problems printing image to BLE printer

**URL:** <https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481>\
**Category:** Questions about Thunkable X\
**Created:** [December 31, 2023, 2:52pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481 "2023-12-31T14:52:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)\
**Post date:** [December 31, 2023, 2:52pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481/1 "2023-12-31T14:52:29Z")

</div>

I am trying to print an image to a printer. I tried converting it to a Byte Array, Hexadecimal and Base64. Neither the Byte Array nor the Hexadecimal gives an output while the Base64 printed garbage.

Would appreciate any assistance.

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [December 31, 2023, 4:21pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481/2 "2023-12-31T16:21:33Z")

</div>

I found some info here about printing the images to a BLE printer

> <https://stackoverflow.com/questions/14530058/how-can-i-print-an-image-on-a-bluetooth-printer-in-android>

Admittedly, this is not a topic I am familiar with at all but does anything in the solution seem feasible?

---

<div class="post-metadata">

**Author:** ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)\
**Post date:** [December 31, 2023, 11:16pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481/3 "2023-12-31T23:16:11Z")

</div>

Not too sure as this uses code to implement the solution. I converted the image to a byte array -  
5 of 4125 lines

```auto
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 

```

but I am not sure how to use this in the BLE Byte array block. I tried placing it a variable via a text block but that didn’t work. If I to create a list, would it be an entry for each one in this file ( 66,000 elements)?

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [January 3, 2024, 3:37pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481/4 "2024-01-03T15:37:47Z")

</div>

Yeah, the byte array should be set as a list with whatever is attached sending one byte of data.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/1/c180ce7d89c55f2b244444b3ef17da6dfebc3f31.png).

It would be large if sending but maybe you could try to use the `make list from text` block with a variable to convert the byte array and then attach it to the list block?

---

<div class="post-metadata">

**Author:** ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)\
**Post date:** [January 3, 2024, 10:55pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481/5 "2024-01-03T22:55:21Z")

</div>

Ok,

So I tried this -

 ![2024-01-03 18 40 42](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce19a89bde5f2dd1a87564bfb7de374b7b1ccd68.png)

The Simple List shows the items but no dice on the printer output. I tried setting the data as the variable alone and it causes the app to crash.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 2, 2024, 10:55pm UTC](https://community.thunkable.com/t/problems-printing-image-to-ble-printer/2764481/6 "2024-04-02T22:55:26Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
