Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: correct broken worker src after upgrade to pdfjs v4 (#7626)

shamoone1ba1a189858
diff --git a/src-ui/angular.json b/src-ui/angular.json
index 90a54e133..7e8b38c87 100644
--- a/src-ui/angular.json
+++ b/src-ui/angular.json
@@ -67,8 +67,8 @@
"src/assets",
"src/manifest.webmanifest",
{
- "glob": "{pdf.worker.min.js,pdf.min.js}",
- "input": "node_modules/pdfjs-dist/build/",
+ "glob": "{pdf.worker.min.mjs,pdf.min.mjs}",
+ "input": "node_modules/pdfjs-dist/legacy/build/",
"output": "/assets/js/"
}
],
diff --git a/src-ui/src/app/app.component.ts b/src-ui/src/app/app.component.ts
index c6de83cd1..7ce6d9494 100644
--- a/src-ui/src/app/app.component.ts
+++ b/src-ui/src/app/app.component.ts
@@ -36,7 +36,7 @@ export class AppComponent implements OnInit, OnDestroy {
private hotKeyService: HotKeyService
) {
let anyWindow = window as any
- anyWindow.pdfWorkerSrc = 'assets/js/pdf.worker.min.js'
+ anyWindow.pdfWorkerSrc = 'assets/js/pdf.worker.min.mjs'
this.settings.updateAppearanceSettings()
}