Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to convert PDF to PNG #9387

Closed
MatthD opened this issue Jan 20, 2018 · 0 comments
Closed

Trying to convert PDF to PNG #9387

MatthD opened this issue Jan 20, 2018 · 0 comments

Comments

@MatthD
Copy link

MatthD commented Jan 20, 2018

Configuration:
MACOS Hsierra, Node 8.7.0

What is the expected behavior?

I am just trying to convert a pdf to png like in the example but with a chain treatment.

What went wrong?

It's says windows is not defined & speaks about a binding thing that should be in the main thread ..

# PDF document loaded.
# PDF document loaded.
# PDF document loaded.
Error: bind() shall be called from main thread
    at error (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:291:17)
    at assert (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:306:5)
    at FontLoader.fontLoaderBind [as bind] (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:2707:5)
    at WorkerTransport.transportObj (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:10140:29)
    at MessageHandler.messageHandlerComObjOnMessage (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:1605:19)
    at Object.<anonymous> (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:9889:24)
    at Array.forEach (<anonymous>)
    at Object.postMessage (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.js:9888:29)
    at MessageHandler.postMessage (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.worker.js:3695:19)
    at MessageHandler.messageHandlerSend [as send] (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.worker.js:3656:10)
    at TranslatedFont.send (src/worker/ocr/node_modules/pdfjs-dist/build/pdf.worker.js:39057:15)
    at src/worker/ocr/node_modules/pdfjs-dist/build/pdf.worker.js:37236:20
    at <anonymous>
(node:18858) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: window is not defined
(node:18858) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants