Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send a print job to a printer through React Native

I am actually building an app that is supposed to print a receipt using a thermal printer or similar receipt printer.

I'm using Google Cloud Print for now but it requires a Google account and I want people to be able to connect the printer directly to their phone and use it.

Is there any way to do that? Any library that could help? I had a look on npm but all I can find are packages to communicate with bluetooth devices, but not about printing in particular.

Thanks for your help!

like image 522
Quentin Avatar asked Feb 07 '17 05:02

Quentin


1 Answers

check if it helps :

 import RNXprinter from 'react-native-xprinter';
 RNXprinter.pickPrinter();
 await RNXprinter.printDemoPage();

FOR MORE DETAILS: https://www.npmjs.com/package/react-native-xprinter

like image 67
Istiak Morsalin Avatar answered Oct 15 '22 10:10

Istiak Morsalin