如何在 angular 或 java 脚本应用程序中实现 MS Word 预览?

问题描述

大家好,我正在开发 Angular 7 应用程序。我需要一个 microsoft word add on 将 blob 显示为 word 文档。目前我们正在使用 iframe 加载文档。请找到下面的代码 HTML代码

<div class="iframeContainer">
<iframe *ngIf="urlLoaded" [src]='docxUrl' width='100%' height='100%' frameborder='0'>This is an embedded <a
        target='_blank' href='http://office.com'>Microsoft Office</a> document,powered by <a target='_blank'
        href='http://office.com/webapps'>Office Online</a>.</iframe>

TS 代码

this.docxUrl = "https://view.officeapps.live.com/op/embed.aspx?src=" + "https://our api end point/documentprocessing-service/csr/pdf/"+ this.selectedStudy.id +'/' +this.randomText;

在这里,我们将我们的内容发送到 Microsoft 服务器,但我们的数据是高度机密的。 所以我们需要在我们的 angular 应用程序中集成 word api 以将 blob 内容显示为 word 文档。 如果您有任何想法,请提前告诉我,谢谢。 您也可以提供任何其他方式(我们的应用中不应使用诸如syncfusion、ckeditor、ngx-doc-viewer之类的npm包)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)