Skip to content

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

self serve pdf.worker.min.js

Stefanaa7e2594e2c7
diff --git a/src-ui/angular.json b/src-ui/angular.json
index ce2dd82f7..db8c66b19 100644
--- a/src-ui/angular.json
+++ b/src-ui/angular.json
@@ -27,7 +27,11 @@
"assets": [
"src/favicon.ico",
"src/assets",
- "src/manifest.webmanifest"
+ "src/manifest.webmanifest", {
+ "glob": "pdf.worker.min.js",
+ "input": "node_modules/pdfjs-dist/build/",
+ "output": "/assets/js/"
+ }
],
"styles": [
"src/styles.scss"
diff --git a/src-ui/src/app/app.component.ts b/src-ui/src/app/app.component.ts
index 84c173a18..330f8f157 100644
--- a/src-ui/src/app/app.component.ts
+++ b/src-ui/src/app/app.component.ts
@@ -6,8 +6,9 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.scss']
})
export class AppComponent {
-
+
constructor () {
+ (window as any).pdfWorkerSrc = '/assets/js/pdf.worker.min.js';
}