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

Support for Angular version v17 #1069

Open
DomBurf opened this issue Feb 19, 2024 · 6 comments
Open

Support for Angular version v17 #1069

DomBurf opened this issue Feb 19, 2024 · 6 comments

Comments

@DomBurf
Copy link

DomBurf commented Feb 19, 2024

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

I have recently upgraded an application to Angular v17. I also upgraded the version of ng2-pdf-viewer to 10.0.0. The PDF documents are no longer displaying in the PDF viewer. I downgraded the version of ng2-pdf-viewer back to the last working version which was 8.0.1 but it's still not working. I've also tried 9.1.3.

Is ng2-pdf-viewer supported in Angular v17?

@johnpage-agixis
Copy link

Works fine here.

  • angular 17.1.0
  • ng2-pdf-viewer 10.0.0

@tanasitaint
Copy link

tanasitaint commented Feb 28, 2024

Works fine for me too

  • angular 17.2.3
  • ng2-pdf-viewer 10.0.0

@hari-ui-skiploop
Copy link

Not working for me actually

  • Angular - 17.3.1
  • ng2-pdf-viewer - 10.0.0

am getting this error on compiling;

**✘ [ERROR] Could not resolve "canvas"

node_modules/pdfjs-dist/build/pdf.js:10759:27:
  10759 │     const Canvas = require("canvas");
        ╵                            ~~~~~~~~

You can mark the path "canvas" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.**

@kitti332
Copy link

Works fine for me too

angular 17.3.0
ng2-pdf-viewer 10.0.0

but can not use together with angular ssr.

@daruom91
Copy link

Not working for me actually

  • Angular - 17.3.1
  • ng2-pdf-viewer - 10.0.0

am getting this error on compiling;

**✘ [ERROR] Could not resolve "canvas"

node_modules/pdfjs-dist/build/pdf.js:10759:27:
  10759 │     const Canvas = require("canvas");
        ╵                            ~~~~~~~~

You can mark the path "canvas" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.**

Same

@Akxe
Copy link
Contributor

Akxe commented May 24, 2024

To be closed

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

7 participants