如何在 office 插件中添加打印功能 [英] How to add print functionality inside office add-ins
问题描述
在我们的组织中,我们构建了一个 Office 插件.现在我们想在我们的加载项中添加打印功能.任何人都可以帮助我如何使用 Office javascript API 添加打印功能.
In our organisation we had built an Office Add-in. Now we wanted to add print functionality in our add-in. Can anybody help me how to add print functionality using Office javascript API.
推荐答案
Office.JS 库中没有打印 API.您可以使用 getFileAsyc API<将文件作为各种格式的 blob 获取/a>.我会询问产品团队他们是否知道如何打印该 blob,如果我发现任何问题,请更新此答案.
There is no print API in the Office.JS library. You can get the file as a blob of various formats with the getFileAsyc API. I'll ask the product team if they know how that blob can be printed and update this answer if I find out anything.
更新:您无法从 Office 加载项中将文档发送到本地安装的打印机或用户 LAN 上的共享打印机.您可以将 Blob 发送到在线打印服务(例如 FedEx)或在用户的公司网络上创建的自定义服务.
UPDATE: You cannot send the document to a locally installed printer or to a shared printer on the user's LAN from within the Office Add-in. You can send the blob to an online printing service, such as FedEx, or a custom service created on the user's corp network.
这篇关于如何在 office 插件中添加打印功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!