From d905af302ba1b76431f167cafc88a5564d5fd345 Mon Sep 17 00:00:00 2001 From: Markus Oppmann <71436559+MaxEtMoritz@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:00:52 +0100 Subject: [PATCH] fix #44 --- lib/src/ng2-pdfjs-viewer.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/ng2-pdfjs-viewer.component.ts b/lib/src/ng2-pdfjs-viewer.component.ts index 586ab060..f2b62a89 100644 --- a/lib/src/ng2-pdfjs-viewer.component.ts +++ b/lib/src/ng2-pdfjs-viewer.component.ts @@ -309,7 +309,7 @@ export class PdfJsViewerComponent implements OnInit, OnDestroy { if (this.externalWindow) { this.viewerTab.location.href = viewerUrl; } else { - this.iframe.nativeElement.src = viewerUrl; + this.iframe.nativeElement.contentWindow.location.replace(viewerUrl); } // console.log(`