Hi,
In my application in angular 6, I am showing Data(Report) in new window as follows.
- *** result contains Base64 data***
- if (result != null) {
- const pdfWindow = window.open("");
- pdfWindow.document.write("
Pathology Report "); - pdfWindow.document.write("
- encodeURI(result) + "#toolbar=0&navpanes=0&scrollbar=0'>")
My html code is as follows
- <iframe [src]="PathReportString">iframe>
- this.PathReportString = (this.sanitizer.bypassSecurityTrustResourceUrl(result) as any).changingThisBreaksApplicationSecurity;
How to embed data to component. Also my data is base64.
What is going wrong? Any help would be appreciated. Thank you.

Jenith ThakkarRank #789 · 2.9K reputationPosted Sep 23, 2020, 9:24 PM EDT
dip sRank #6,374 · 268 reputationPosted Sep 23, 2020, 9:37 PM EDT