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

Not working in an Angular 12 app #49

Open
aquisio opened this issue Sep 6, 2021 · 3 comments
Open

Not working in an Angular 12 app #49

aquisio opened this issue Sep 6, 2021 · 3 comments

Comments

@aquisio
Copy link

aquisio commented Sep 6, 2021

Hi there,

I am attempting to use pdfAnnotate in an Angular 12 app, in conjunction with ng2-pdf-viewer (which is an Angular wrapper for pdf.js).

I have followed your documented procedure for installing the pdfAnnotate package and the required Angular 9 changes to package.json ...

{
...
        "browser": {
                "fs": false
        }
...
}

... but I am seeing the following error message:

./node_modules/annotpdf/lib/annotation.js:121:25-38 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\Samples\pdfAnnotate\node_modules\annotpdf\lib'

Am I doing something wrong, or is a different configuration required for later Angular versions?

Thanks, in advance.

@OldShaterhan
Copy link

OldShaterhan commented Jan 27, 2022

Same issue for me.

@VincentRoth
Copy link

Hello, I had the same issue for Angular v12.2.5.
As far as I dig into the issue, it seems to come from webpack and angular configuration and is not on annotpdf side.

I ugrade to Angular 13 and annotpdf works.

@juqing27
Copy link

@VincentRoth and @aquisio - Hi! I'm working on an Angular (Angular17) app and am hoping to use pdfAnnotate together with ng2-pdfjs-viewer. Haven't got it work so far but it sounds possible in theory, since ngs-pdfjs-viewer is exposing pdf.js as it states. Wonder if you may show me how to integrate these two libraries? For now I'm just trying to create simple annotations, for example using the pdfFactory.createSquareAnnotation() function. Thanks so much!

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

5 participants
@OldShaterhan @VincentRoth @aquisio @juqing27 and others