Giter VIP home page Giter VIP logo

react-native-star-prnt's Introduction

react-native-star-prnt

react-native bridge for Star micronics printers.

Ionic/Cordova Version ➜ here

Installation

$ npm install react-native-star-prnt --save

Link

$ react-native link react-native-star-prnt

iOS Configuration

  1. In XCode, go to Build Phases, Link Binary with Libraries and Add the following frameworks:

    • Go to node_modulesreact-native-star-prntiosFrameworks and add StarIO.framework and StarIO_Extension.framework
    • Add the CoreBluetooth.framework
    • Add the ExternalAccessory.framework
  2. Go to Build Settings ➜ Search Paths and Add $(PROJECT_DIR)/../node_modules/react-native-star-prnt/ios/Frameworks to Framework Search Paths

For Bluetooth printers:

  1. Click on the information property list file (default : “Info.plist”).
  2. Add the “Supported external accessory protocols” Key.
  3. Click the triangle of this key and set the value for the Item 0 to jp.star-m.starpro

Usage

import { StarPRNT } from 'react-native-star-prnt';

async function portDiscovery() {
    try {
      let printers = await StarPRNT.portDiscovery('All');
      console.log(printers);
    } catch (e) {
      console.error(e);
    }
  }

Take a look at the Documentation

react-native-star-prnt's People

Contributors

alexlevy0 avatar ararog avatar bliii avatar dnlowman avatar hasanej avatar infoxicator avatar jimmybaker avatar nathanoertel avatar thekidcoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-star-prnt's Issues

TS Errors

Typescript errors for typings in the main index.js not a .ts file and no type declaration for the StarPRNT class in the types/index.d.ts.

Failed to Open Port via Ethernet only with weird checkStatus result

First thanks for this wonderful library. I've successfully implemented printing functionality for MCP31LB (mC-Print3) using portDiscovery() and print() function via Bluetooth and Lightning on iPad.

  1. When I try to find my printer connected to a WiFi router using portDiscovery(), it returns an empty array on some routers and in some other routers, it does return an array containing a correct IP address (ex. TCP: 192.168.86.xx).

Maybe it's related to some router configuration, but I'm not sure what to look for.

  1. In the latter case, print() fails with status code Failed to Open Port even with the result returned by portDiscovery(). If I do checkStatus(),
{
  "overTemp": false,
  "cutterError: false,
  "coverOpen": true,
  "offline": false,
  "receiptPaperEmpty": false
}

result is lacking firmware version (maybe getting firmware version failed?), and somehow coverOpen returns true though it's not.

My code is like this.

StarPRNT.checkStatus('TCP:192.168.86.xx', 'StarPRNT')

If I connect via Bluetooth, the result of checkStatus() looks correct with the following:

{
    "coverOpen": false,
    "overTemp": false,
    "ModelName": "mC-Print3",
    "FirmwareVersion": :3.1",
    "offline": false,
    "receiptPaperEmpty": false,
    "cutterError": false,
  }

I'm not sure what's happening here, also not sure where to look for either..

If anyone knows what the cause of this could be, I'd really appreciate some help/information.

Expo compatibility

Hi,
I dont find in the docs about expo compatibility,
can i use it with expo?

Only PartialCutWithFeed works with TSP100IIIW

I was able to connect to the printer and send a print command.

However, every print only comes out with tiny little slip with partial cut.

async function portDiscovery() {
  try {
    let printers = await StarPRNT.portDiscovery('All')
    console.log(printers)
    if (printers && printers.length > 0) {
      await connect(printers[0].portName)
      portName = printers[0].portName
      await new Promise(r => setTimeout(r, 5000))
      let commands = []
      commands.push({ append: 'Star Clothing Boutique\n' + '123 Star Road\n' + 'City, State 12345\n' + '\n' })
      commands.push({ appendRawBytes: [0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e] })
      commands.push({ appendRaw: 'Star Clothing Boutique\n' + '123 Star Road\n' + 'City, State 12345\n' + '\n' })
      commands.push({ appendUnderline: 'Star Clothing Boutique\n' + '123 Star Road\n' + 'City, State 12345\n' + '\n' })
      commands.push({ appendAbsolutePosition: 40, data: 'Text with absolute position' })
      commands.push({ appendCutPaper: StarPRNT.CutPaperAction.PartialCutWithFeed })
      commands.push({ appendRaw: 'Star Clothing Boutique\n' + '123 Star Road\n' + 'City, State 12345\n' + '\n' })
      commands.push({ appendRaw: 'Star Clothing Boutique\n' + '123 Star Road\n' + 'City, State 12345\n' + '\n' })
      commands.push({ appendRaw: 'Star Clothing Boutique\n' + '123 Star Road\n' + 'City, State 12345\n' + '\n' })

      print(commands, printers[0].portName)
    }
  } catch (e) {
    console.error(e)
  }
}

this is my connect function

async function connect(portName, emulation = StarPRNT.Emulation.StarGraphic, hasBarcodeReader = false) {
  try {
    var connect = await StarPRNT.connect(portName, emulation, hasBarcodeReader)
    console.log(connect) // Printer Connected!
  } catch (e) {
    console.error(e)
  }
}

and print function

async function print(commands, portName, emulation = StarPRNT.Emulation.StarGraphic) {
  try {
    var printResult = await StarPRNT.print(emulation, commands, portName)
    console.log(printResult) // Success!
  } catch (e) {
    console.error(e)
  }
}

Can't print bitmap and barcode on the same line

I know the SDK allows it because the sample prints from the SDK app do it.
I'm trying to print a barcode with a bitmap image side by side but every append command starts in a newline and I'm not sure how to use appendBitmap and appendBarcode with appendMultiple.

       commands.push({ appendCutPaper: 'PartialCut'});
       commands.push({
            appendBarcode: "{B" + '88712365444',
            BarcodeSymbology: 'Code128',
            BarcodeWidth: 'Mode1',
            height: 100,
            hri: true,
        });
        commands.push({
            appendBitmap: logo.data,
            width: 100,
            bothScale: true,
            diffusion: true,
        });

IMG_2047

Missing info on podspec

I'm getting the following error when running command pod install:

[!] The RNStarPrnt pod failed to validate due to 1 error:
- ERROR | attributes: Missing required attribute homepage.
- WARN | source: The version should be included in the Git tag.
- WARN | description: The description is equal to the summary.

Also, its a common pratice move podspec to the root folder and updating references to iOS folder.

TSP100 alignment with Barcode and QRcode not working

I'm playing around with some of the commands, and I can't seem to figure out why alignment does not work with Barcode and QRcode. Here's the command I'm testing with (same as the example)

commands.push({ appendQrCode: "{BStar", QrCodeModel: "No2", QrCodeLevel: "L", cell: 8, alignment: "Center" });

how to use png file on react-native-star-prnt.

now I am working on react native app using react-native-view-shot and react-native-star-prnt.
I got png file for webview by using react-native-view-shot plugin.
I gonna print this png file with react-native-star-prnt plugin.
pls apply 'react-native print convert' text on your bid top.
But this printer plugin doesn't support png, only bitmap.
So i think I have to convert react native image module which convert png/jpg to bitmap.
Or not How to use png data on printer?

TSP100 can not print anything, it will only cut paper...

Can't figure out what causes the problem. The result shows success, but it will only do cut paper action, nothing will be printed.

Please help! Both IOS & Android are the same.

{result: true, title: "Send Commands", message: "Success"}

print = async(emulation, commands, portName)=> {
//await this.portDiscovery();
//await this.connect(portName, emulation, false);

    try {
      var printResult = await StarPRNT.print(emulation, commands, portName);
      console.log(printResult); // Success!
    } catch (e) {
      console.log(e);
    }

}

printReceipt = ()=>{
let commandsArray = [];
// commandsArray.push({appendInternational: 'USA'});
// commandsArray.push({appendEncoding: 'GB2312'});
// commandsArray.push({appendFontStyle: 'A'});
// commandsArray.push({appendMultiple:" $156.95\n", width:2, height:2});
// commandsArray.push({append:" $156.95. test test test\n"});
// commandsArray.push({appendAlignment: 'Left'});

commandsArray.push({append:" $156.95. test test test\n"});
commandsArray.push({append:
    "Star Clothing Boutique\n" +
    "123 Star Road\n" +
    "City, State 12345\n" +
    "\n"});
commandsArray.push({appendCutPaper: StarPRNT.CutPaperAction.FullCutWithFeed});

this.print('StarGraphic', commandsArray, 'TCP:192.168.1.24');

}

StarIOExtManager print not working

I'm not able to print it says invalid port name check my code below:

`printInvoice = async () => {
try {
var connect = await StarPRNT.connect('BT:00:12:F3:3A:66:1B', 'StarPRNT', true);
console.log(connect); // Printer Connected!
} catch (e) {
console.error(e);
}

    let commands = [];
    commands.push({
        append:
            "Star Clothing Boutique\n" +
            "123 Star Road\n" +
            "City, State 12345\n" +
            "\n"
    });
    commands.push({appendCutPaper: StarPRNT.CutPaperAction.PartialCutWithFeed});

    try {
        var printResult = await StarPRNT.print('StarPRNT', commands);
        console.log(printResult); // Success!
    } catch (e) {
        console.error(e);
    }
};`

however, it gives below error:

Printer Connected ExceptionsManager.js:82 Error: Invalid port name. at createErrorFromErrorData (NativeModules.js:155) at NativeModules.js:104 at MessageQueue.__invokeCallback (MessageQueue.js:414) at MessageQueue.js:127 at MessageQueue.__guard (MessageQueue.js:314) at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126) at debuggerWorker.js:80

Connection with printer with bluetooth is very unstable

Hi,

I'm setting up a star TSP 100III with RN 0.61 through Bluetooth.
Every time I start to print the connection is really slow and most of the times I end up with this error:

image

Other times, I get this error:
image

Is there anyone with such experience in the past? How did you solve or can you suggest any workaround here?

I'll leave my code below so you can see what I'm doing. I'm trying to follow what there is on the documentation but I might missed something there.

import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View, ActivityIndicator, Button } from 'react-native';
import {StarPRNT} from 'react-native-star-prnt';
const EMULATION = 'StarGraphic';
export default class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      printer: {},
      isLoading: false,
      isConnected: false
    };
  }

  portDiscovery = async () => {
    this.setState({isLoading: true})
    try {
      const printers = await StarPRNT.portDiscovery('All');
      printers.forEach(p =>{
        if (p.macAddress === "00:11:62:17:11:CB"){
          this.connect(p)
          return
        }
      })
    } catch (e) {
      console.error(e);
    }
  }

  connect = async(printer)=> {
    let isConnect = false;
    try {
      isConnect = await StarPRNT.connect(printer.portName, EMULATION, true);
      console.log('connect success',isConnect); // Printer Connected!
      this.setState({
        isLoading: false,
        printer
      })
    } catch (e) {
      console.log('connection error',e);
    }
  }

  handlePrint = async () => {
    try {
      let status = await StarPRNT.checkStatus(this.state.printer.portName,EMULATION);
      console.log("status",status);
      if(!status.offline){
        console.log("starting...");

        let commands = [];
        commands.push({append:
                "Star Clothing Boutique\n" +
                "123 Star Road\n" +
                "City, State 12345\n" +
                "\n"});
        commands.push({appendCutPaper:StarPRNT.CutPaperAction.PartialCutWithFeed});
        var rslt = await StarPRNT.print(EMULATION, commands, this.state.printer.portName);
        console.log(rslt); // Success!
      }
    } catch (e) {
      console.log(1,e);
    }
  };

  render() {
    console.log(this.state.isLoading)
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Connected: {this.state.printer.modelName}</Text>
        {this.state.isLoading ? (<ActivityIndicator animating={true}/>) : <Button onPress={this.portDiscovery} title="Press here" />}
        {!this.state.isLoading && <Button onPress={this.handlePrint} title="Print" />}
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
});

Is there any way to adjust text size for append?

This is probably not an issue with the library, but has anyone found a way to adjust the text size when using the append method? The text is way too small for the use case. I've spent hours googling and cannot find a clear explanation of how to adjust text size.

appendMultiple allows a height and width but the moment you go from 1 to 2, it's too large. I need something like 1.5 but this method doesn't recognize non-integers.

Curious if anyone has any advice on how to accomplish a text size and style similar to this (specifically the items and prices):
uereceipt

Cyrillic encoding seems not to work

Hello,
I am trying to print in Bulgarian language, but the encoding seems not to work.
Here is my code:

var commandsArray = [];
commandsArray.push({appendEncoding: StarPRNT.Encoding.Windows1251});
commandsArray.push({appendAlignment: StarPRNT.AlignmentPosition.Center});
commandsArray.push({append: '* ******** *\n'});
commandsArray.push({append: '* Български *\n'});
commandsArray.push({
  appendCutPaper: StarPRNT.CutPaperAction.PartialCutWithFeed,
});

async function print() {
  try {
    var printResult = await StarPRNT.print(
      'StarPRNT',
      commandsArray,
      'BT:00:15:0E:E6:6E:74',
    );
    console.log(printResult); // Success!
  } catch (e) {
    console.error(e);
  }
}

when I print I only get some strange symbols. Anyone else tried to print in Bulgarian/Russian?

Unable to Connect and Print TSP650II via Bluetooth

export async function getPrinters() {
    let printers = []
    try {
        printers = await StarPRNT.portDiscovery("All");
    } catch (e) {
        console.log(e);
    }
    return printers
}
export async function connectAndPrint(prnt, imageUrl) {
    console.log("started===================>");
    try {
            console.log("select printerprnt", prnt);
            let isConnected = await connect(EmulationPrinter, prnt.portName);
            if (isConnected) {
                console.log("printerprnt is connected, start printing", isConnected);
                let status = await StarPRNT.checkStatus(prnt.portName, EmulationPrinter);
                console.log("status", status);
                if (!status.offline) {
                    console.log("printer online, starting printing");
                    await print(
                        EmulationPrinter,//StarLine
                        prnt.portName,
                        getCommands(imageUrl));
                } else {
                     console.log("Printer is offline");
                }
            } else {
                console.log("printerprnt is not connected", isConnected);
            }
        console.log("stop========================>");
    } catch (e) {
        console.log(e);
    }
}

Printer is discovered using above getPrinters function. But when i try to connect and print it always show printer not connected.
Any help is appreciated.
Thanks.

Android build failing

Using this library with Expo. After upgrading to Expo SDK 37, I was getting the error:

error: cannot find symbol class NonNull

So I added the following to gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

Now I get this when trying to build...

.../node_modules/react-native-star-prnt/android/src/main/java/net/infoxication/reactstarprnt/RNStarPrntModule.java:16: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;

TSP100III: append doesnt work, only appendBitmapText.

When testing the example from the documentation...

commands.push({append:
        "Star Clothing Boutique\n" +
        "123 Star Road\n" +
        "City, State 12345\n" +
        "\n"});
commands.push({appendCutPaper:StarPRNT.CutPaperAction.PartialCutWithFeed});

The printer only cuts the paper. It does not print any text.

I was finally able to get it to print text with the appendBitmapText param. I am able to change fontSize on these commands. However, I cannot use methods like:

  • appendInvert
  • appendUnderline
  • appendAlignment
  • etc

The result is a very constrained set of formatting and styling.

TSP100IIIW Wifi prints little blank page

I had tried all configurations and no luck. Can anyone help me?
Printer connects successfully and after printing status is success.
` const emulation = "StarGraphic"

async function print(uri) {

    setStatus(`${printer.modelName}, is Printing...`)

    let text = "Test print...\nTest mealeo print...\nTest print...\nTest print...\nTest print...\nTest print...\nEND PRINTING"
    let imageURI = '../assets/images/sign_in/facebook_icon_blue.png'
    var commandsArray = [];

    commandsArray.push({ appendBitmapText: text, fontSize: 18, alignment: "Center" });
    commandsArray.push({ appendBitmap: imageURI, diffusion: true, width: 576, bothScale: true, alignment: "Center" })
    commandsArray.push({ appendLogo: 1, logoSize: 'DoubleWidthDoubleHeight' })
    commandsArray.push({ appendEmphasis: "SALE\n" })
    commandsArray.push({ enableEmphasis: true })
    commandsArray.push({ appendAbsolutePosition: 40, data: "Text with absolute position" })
    commandsArray.push({ appendRawBytes: [0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e] })
    // commandsArray.push({ appendBitmap: uri, width: 300})
    commandsArray.push({ appendCutPaper: StarPRNT.CutPaperAction.PartialCutWithFeed });

    try {
        var printResult = await StarPRNT.print(emulation, commandsArray, printer.portName);
        console.log("RESULT:", printResult); // Success!
        setStatus(`${printer.modelName}, Result: ${printResult}, printing complete!`)
    } catch (e) {
        console.log("ERRROR:", e);
        setStatus(`${printer.modelName}, error while printing! ${e}`)
    }
}

`

appendBitmap Android with base64 image uri - java.io.FileNotFoundException: No content provider

Hi there.

When using base64 uri image string, IOS works flawlessly but on Android it was throwing java.io.FileNotFoundException: No content provider error.

If I alter bitmap parse with decode/write bytes below it would then work. Just wondering if this feature can be added or if I am missing something and should be handling this differently.

Thanks! Awesome library btw.

uriString = uriString.replace("data:image/png;base64,","");
byte[] decodedString = android.util.Base64.decode(uriString, Base64.DEFAULT);
Bitmap decodedByte = android.graphics.BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);

builder.appendBitmap(decodedByte, diffusion, width, bothScale, rotation);

Requires Main Queue Warning

We're using v1.0.0 in our app and get this debug message:

2019-04-28 16:42:22.652 [warn][tid:main][RCTModuleData.mm:67] Module RNStarPrnt requires main queue setup since it overrides `constantsToExport` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

Which is odd because it appears to be implemented correctly.

Port discovery is returning empty array

I have a TSP100USB connected up to my iPad, however portDiscovery() returns an empty array. When I specify a connection using the parameters for TSP100U, I get back an empty array. Any idea what could be the issue?

Using EXPOKit and React Native 0.57.1

async connect() {
    try {
      var connect = await StarPRNT.connect(
        'USB:TSP100',
        'StarGraphic',
        false
      )
      console.log('Connected')
      console.log(connect) // Printer Connected!
    } catch (e) {
      console.log('error')
      console.error(e)
    }
  }

  async portDiscovery() {
    try {
      let printers = await StarPRNT.portDiscovery('All')
      console.log(printers)
    } catch (e) {
      console.error(e)
    }
  }

Print Html

is there is any way to support print html

Star Print in SM230i appendBitmap not print anything

Hi,

I try to print image in printer Star SM-230i but de appendBitmap not print anything. I try different configurations but nothing...

I use a uri base64 to print the image?

Someone can explain me how i can print it?

My code:

commandsArray.push({
appendBitmap: sign,
width: 100,
rotation: StarPRNT.BitmapConverterRotation.Normal
});

thanks

Andoni

Supporting emulation of any STAR printer(in documentation list)

In order to give the flexibility of connecting to any Star printer, whether the emulation is StarPRNT or StarGraphic or ESCPOS, we would need to be able to get a model's emulation from a function like portDiscovery or connect where we can get the emulation of a specific model and accordingly input a bitmap or string to the specific printer. It does not seem like we are getting the emulation from these functions so how would do support different star printer models?

RCTBridgeModule.h file not found

I've followed the steps from README in order to add the library into my project however when I try building it, I always get the React/RCTBridgeModule.h file cannot be found error. I've ejected from a CRNA project.

Duplicate symbol causes build to fail

I know this isn't a problem with this repo and maybe I'm wrong to ask here but I'm going to anyway:

What do you do when the StarIO.framework uses duplicate symbols from other third-party libraries? Our app already supports Epson printers and now that we're trying to add support for star printers, we get this message when trying to build:

duplicate symbol _GetOnlineStatus in:
    /projects/MyApp/node_modules/react-native-star-prnt/ios/Frameworks/StarIO.framework/StarIO(StarIOPort.o)
    /projects/MyApp/ios/libepos2.a(eposprint_common_status.o)
duplicate symbol _hasListeners in:
    /Users/jimmy/Library/Developer/Xcode/DerivedData/MyApp-gjwlztxwlgeyipbojfoewcpshknr/Build/Products/Debug-iphoneos/ReactNativeSocketMobile/libReactNativeSocketMobile.a(ReactNativeSocketMobile.o)
    /Users/jimmy/Library/Developer/Xcode/DerivedData/MyApp-gjwlztxwlgeyipbojfoewcpshknr/Build/Products/Debug-iphoneos/libRNStarPrnt.a(RNStarPrnt.o)
ld: 2 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Command does not print text but be able to print QR Code and Barcode

We have manage to

  • List printer
  • connect printer
  • get status of printer
  • send command to printer

Printer Model: TSP100III
Here is our print result in console log:
image

Here is the result on reciept:
image

Here is the source code:
https://gitlab.com/CHOMNANP/react-native-star-print-example

Anyway problem that text is not print properly. We have send several command including text, QR Code and Barcode.

Only Barcode and QR is printed on the paper, but text is not printed. Any comment where we can the problem?

Please refer to the code via the link above

Expo ejected project link not working, error:ld: framework not found StarIO_Extension clang: error: linker command failed with exit code 1 (use -v to see invocation)

I got a project created using expo. In order to link this package. I detached from expo using ExpoKit. When I build the project I got:Apple Mach-O Linker Error error:ld: framework not found StarIO_Extension clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anyone has any ideas?

Instead, I use cocoapod to install the package:
I added those two lines to the podfile
pod 'RNStarPrnt', :path => "../node_modules/react-native-star-prnt", :podspec => "../node_modules/react-native-star-prnt/ios/RNStarPrnt.podspec"

but got those errors:

The RNStarPrnt pod failed to validate due to 1 error:
- ERROR | attributes: Missing required attribute homepage.
- WARN | source: The version should be included in the Git tag.
- WARN | description: The description is equal to the summary.
when I added homepage string. It gave me
remote: Repository not found. fatal: repository 'https://github.com/author/RNStarPrnt.git/' not found.

Question about error code "Fail to Open Port"

Hi there,

Not sure what I did wrong but when I try print or connect I get failed to open port error. The printer is definitely on network and tested working with another device (not written via react native)

As far as I can tell StarPRNT.checkStatus works as I can get printer info, just not print or connect below.

Thanks in advance.

StarPRNT.print('StarGraphic', commands, printer.portName).then(()=>{
  console.log('printed');
}, err=>{
  this.setState({
    printerError: err.code
  })
});

StarPRNT.connect(printer.portName, 'StarGraphic', false).then(()=>{
  this.setState({
    connectedPrinter: printer
  });
}, err=>{
  this.setState({
    printerError: err.code
  })
})

Undefined is not an object(RNStarPRNT.portDiscovery)

Hello,
I want to use StarPRNT module and I tried your example function but I get the error.

`import { StarPRNT } from 'react-native-star-prnt';

async function portDiscovery() {
try {
let printers = await StarPRNT.portDiscovery('All');
console.log(printers);
} catch (e) {
console.error(e);
}
}`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.