neodynamic / JSPrintManager

Advanced Client-side Printing & Scanning Solution for Javascript
https://www.neodynamic.com/products/printing/js-print-manager/
257 stars 137 forks source link

Scan Docs & Images with React #47

Closed MohammedJKamel closed 2 years ago

MohammedJKamel commented 2 years ago

Hi All , I get error when I use Scan Docs & Images in react App with can you please assist me how can I solve this issue and can you please assist me how can I use Scan Docs & Images with React hooks

the error :

JSPrintManager.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'send')
    at JSPrintManager.js:2:1
    at new Promise (<anonymous>)
    at n.getScanners (JSPrintManager.js:2:1)
    at ScanningSample.componentDidMount (scanner.js:100:1)
    at commitLayoutEffectOnFiber (react-dom.development.js:23204:1)
    at commitLayoutMountEffects_complete (react-dom.development.js:24578:1)
    at commitLayoutEffects_begin (react-dom.development.js:24564:1)
    at commitLayoutEffects_begin (react-dom.development.js:24546:1)
    at commitLayoutEffects_begin (react-dom.development.js:24546:1)
    at commitLayoutEffects_begin (react-dom.development.js:24546:1)
    at commitLayoutEffects (react-dom.development.js:24502:1)
    at commitRootImpl (react-dom.development.js:26779:1)
    at commitRoot (react-dom.development.js:26638:1)
    at performSyncWorkOnRoot (react-dom.development.js:26073:1)
    at flushSyncCallbacks (react-dom.development.js:12009:1)
    at flushSync (react-dom.development.js:26157:1)
    at Object.scheduleRefresh (react-dom.development.js:27749:1)
    at react-refresh-runtime.development.js:304:1
    at Set.forEach (<anonymous>)
    at Object.performReactRefresh (react-refresh-runtime.development.js:293:1)
    at RefreshUtils.js:62:1
neodynamic commented 2 years ago

The demo at this repo is based on Rect... have you looked at it? https://github.com/neodynamic/JSPrintManager/blob/master/components/ScanningSample.js