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(`