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

Error: render no longer accepts the canvasFactory-option, please pass it to the getDocument-function instead #30

Open
Nolesh opened this issue Apr 4, 2023 · 1 comment

Comments

@Nolesh
Copy link

Nolesh commented Apr 4, 2023

It works great on Windows 11, but when I try to run it in docker with debian:11-slim and node 18.x, it says:

Error: render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.
    at PDFPageProxy.render (/home/site/wwwroot/server/node_modules/pdf-to-png-converter/node_modules/pdfjs-dist/legacy/build/pdf.js:4838:13)
    at pdfToPng (/home/site/wwwroot/server/node_modules/pdf-to-png-converter/out/pdf.to.png.js:74:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Could you fix it please?

@dichovsky
Copy link
Owner

It works great on Windows 11, but when I try to run it in docker with debian:11-slim and node 18.x, it says:

Error: render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.
    at PDFPageProxy.render (/home/site/wwwroot/server/node_modules/pdf-to-png-converter/node_modules/pdfjs-dist/legacy/build/pdf.js:4838:13)
    at pdfToPng (/home/site/wwwroot/server/node_modules/pdf-to-png-converter/out/pdf.to.png.js:74:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Could you fix it please?

Please try v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants