Failed to update from version 3.0.279 to 4.2.67 of pdfjs-dist #18213
Unanswered
stefanheinze
asked this question in
Q&A
Replies: 2 comments 1 reply
-
This seemed to work for me if you want to give it a try (inspired by import * as pdfJs from 'pdfjs-dist';
export function loadPdfJs() {
pdfJs.GlobalWorkerOptions.workerSrc = new URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url).toString();
return pdfJs;
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
Did you get any errors like
or...
I'm also going through a similar upgrade. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Because of a security vulnerability we need to update in our product the pdfjs-dist version from 3.0.279 to 4.2.67.
We have the library integrated in an angular 17 application, so the application runs in a browser.
In version 3.0.279 our setups looked like that. We have the depenedency added to our package.json and initialize the pdfjs library when our module is created.
After initializing the library we can use it in our component:
In version 4.2.67 we tried to initialize the library in the same way:
But the pdfJs can not be loaded, therefore i can not set the worker. I saw also different ways to set the worker (by url or whatever). But i can not go the first step.
Can someone help on that topic. For us its very urgend these days to do the update to a newer version.
Beta Was this translation helpful? Give feedback.
All reactions