Edge 浏览器会记住上次的 PDF 视图设置

问题描述 投票:0回答:1

我有一个角度应用程序,我们在 iFrame 中显示 PDF 报告(通过 API 下载)。

.TS代码:

this.subscription = this.reportservice.execute().subscribe((response: Blob) => {
      let file = new Blob([response], {type: 'application/pdf'});
      let fileURL = URL.createObjectURL(file);
      this.url = this.sanitizer.bypassSecurityTrustResourceUrl(fileURL);
    }, (error) => {
    });

.html代码:

<iframe width="100%" height="900px" frameBorder="0" [src]="url"></iframe>

Edge 浏览器会以某种方式记住上次查看时的缩放/页码设置,并使用上次查看的设置加载下一份报告。 Edge 浏览器有一个设置来禁用它。但是,这需要为所有用户完成。无论如何以编程方式强制它忘记上次查看的设置?不幸的是,它甚至会记住不同报告的设置

angular iframe microsoft-edge pdf-viewer
1个回答
0
投票

看起来 K J 提到的查询字符串在 iframe 中不受尊重。将 PDF 拉出 iframe 应该可以使查询字符串起作用(如果可以的话)。

无论如何,打开 PDF 到上次查看的位置当您重新打开文件 是默认打开的,部分原因是之前有大量用户请求此功能。

© www.soinside.com 2019 - 2024. All rights reserved.