HTML页面中的Word文档不显示工具栏

发布于 2024-07-25 16:20:04 字数 124 浏览 0 评论 0原文

我需要在html页面中显示服务器上动态生成的word文档 我尝试使用 OBJECT 标签,文档确实显示正确。 但缺少打印、文件等工具栏。 注意:第二个需求是让用户能够打印所显示的word文档的内容,因此打印工具栏对此至关重要。

I have a requirement to display dynamically generated word document on the server in an html page
I tried using the OBJECT tag and the document was indeed displayed correct. But the toolbars like print, file etc are missing.
Note: secondary requirement is to enable the user to print the contents of the word document displayed, so the print toolbar is essential for this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

驱逐舰岛风号 2024-08-01 16:20:04

我不确定这是否真的可能。 当您使用 标记时,将调用 Word 来呈现文档,但您实际上并没有在浏览器中运行完整的 Word 实例。 我怀疑是否有任何方法可以让 Word 在 区域内显示其 UI。

您可能需要编写一些 JavaScript 来调用浏览器的打印功能。

I'm not sure that this is actually possible. When you use the <object> tag, Word is being invoked to render the document, but you don't actually have a full-fledged instance of Word running in the browser. I doubt that there's any way to get Word to display its UI inside the <object> area.

You may have to write some javascript to invoke the browser's print capabilities.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文