Nourished Personal Mucus

    @tumihub/react-native-thermal-print
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.8 • Public • Published

    @tumihub/react-native-thermal-print

    impresion termica

    Installation

    yarn add @tumihub/react-native-thermal-print

    Usage

    import ThermalPrint from '@tumihub/react-native-thermal-print';
    
    // ... Impresión con Bluetooth ...
    const configs = {
      printerWidthMM: 58,
      printerNbrCharactersPerLine: 32,
      printerDpi: 180,
    };
    const image = `[C]<img>${pathFile}</img>\n`;
    const qr = `[C]<qrcode size='20'>http://www.developpeur-web.dantsu.com/</qrcode>\n`;
    const payload = `${image}${desingText}${qr}`;
    
    ThermalPrint.printBluetooth(mac, payload, configs).progress(({ progress }) => {
      console.log('progress', progress);
    });
    import ThermalPrint from '@tumihub/react-native-thermal-print';
    
    // ... Impresión con Red(TCP) ...
    const configs = {
      printerWidthMM: 80,
      printerNbrCharactersPerLine: 48,
      printerDpi: 200,
    };
    const image = `[C]<img>${pathFile}</img>\n`;
    const qr = `[C]<qrcode size='20'>valueQrCode</qrcode>\n`;
    const payload = `${image}${desingText}${qr}`;
    
    ThermalPrinter.printTcp(ipAddress, 9100, payload, configs).progress(
      (progress) => {
        console.log('progress', progress);
      }
    );
    import ThermalPrint from '@tumihub/react-native-thermal-print';
    
    // ... Obtener impresoras Bluetooth ...
    const [devices, setDevices] = useState([]);
    
    useEffect(() => {
      ThermalPrinter.getDevicesBluetooth().then((val) => {
        setDevices(val);
      });
    }, []);

    Contributing

    See the contributing guide to learn how to contribute to the repository and the development workflow.

    License

    MIT

    Install

    npm i @tumihub/react-native-thermal-print

    DownloadsWeekly Downloads

    71

    Version

    0.1.8

    License

    MIT

    Unpacked Size

    189 kB

    Total Files

    58

    Last publish

    Collaborators

    • tumihub