Try just using relative URL for pdf worker src

This commit is contained in:
shamoon 2023-12-06 14:37:02 -08:00
parent 594226d5a4
commit 1c52eaf1ae
2 changed files with 1 additions and 3 deletions

View File

@ -33,8 +33,6 @@ export class AppComponent implements OnInit, OnDestroy {
private renderer: Renderer2,
private permissionsService: PermissionsService
) {
let anyWindow = window as any
anyWindow.pdfWorkerSrc = 'assets/js/pdf.worker.min.js'
this.settings.updateAppearanceSettings()
}

View File

@ -231,7 +231,7 @@ export class PdfViewerComponent
private element: ElementRef<HTMLElement>,
private ngZone: NgZone
) {
PDFJS.GlobalWorkerOptions['workerSrc'] = '/assets/js/pdf.worker.min.js'
PDFJS.GlobalWorkerOptions['workerSrc'] = 'assets/js/pdf.worker.min.js'
}
ngAfterViewChecked(): void {