react-native-thermal-receipt-printer-image-qr icon indicating copy to clipboard operation
react-native-thermal-receipt-printer-image-qr copied to clipboard

How to print text on the left and an image on the right?

Open MarkCay opened this issue 2 years ago • 2 comments

Hello. I need help printing a specific template on my Bluetooth thermal printer, but I can't find the documentation about printing a text and image in the same row.

This is the type of receipt I want to achieve on an Android device: Template #2

In a single row, there will be 2 columns:

  • 1st column contains the text (In the picture above, there are 3 rows of text, but I will be happy to at least have a single row of text)
  • 2nd column contains the image (I generate my QR code image using this free QR code API)

Printer Specs

  • Type: Thermal Receipt Printer (Bluetooth)
  • Brand: GOOJPRT
  • Model: PT210
  • Print Width: 48mm
  • Print Speed: 90mm/s

I hope you can help me. Thank you in advance!

MarkCay avatar Aug 06 '22 09:08 MarkCay

I think you should use the library: https://www.npmjs.com/package/react-native-view-shot to capture your screen and then print with function printImageBase64

thiendangit avatar Aug 06 '22 16:08 thiendangit

Thank you @thiendangit . I really appreciated the reply. I will try this one.

MarkCay avatar Aug 07 '22 14:08 MarkCay