sogatanco
sogatanco

Reputation: 15

Can't use JSPrintManager in reactjs

I try use JSPrintManager in reactjs app. I just added model using npm then import it import JSPM from 'jsprintmanager' but when I call JSPM.JSPrintManager I get this error

here the code

import JSPM from 'jsprintmanager' componentDidMount() {

    JSPM.JSPrintManager.auto_reconnect = true;
    JSPM.JSPrintManager.start();

}

here the error enter image description here

Upvotes: 0

Views: 840

Answers (2)

Aldair Luna Buitron
Aldair Luna Buitron

Reputation: 26

You can use this import:

I used "jsprintmanager": "^4.0.7"

import { JSPrintManager, WSStatus, ClientScanJob, ScannerImageFormatOutput } from 'jsprintmanager';

and now you can use

JSPrintManager.auto_reconnect = true;
JSPrintManager.start();

Not use JSPM

Upvotes: 1

Gibanica
Gibanica

Reputation: 79

It is also important to mention that you need to have actual client app installed. It won't work without it and you will get a runtime error, especially if you use code from their demo example.

Upvotes: 0

Related Questions