HTML页面中的Word文档不显示工具栏
我需要在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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定这是否真的可能。 当您使用
您可能需要编写一些 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.