Reputation: 15
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();
}
Upvotes: 0
Views: 840
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
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