以编程方式或第三方工具将 Office 文档转换为 XPS 文件

发布于 2024-12-29 02:10:00 字数 372 浏览 4 评论 0原文

我正在开发一个应用程序,它实际上需要在预览窗格中进行文件预览,因此在谷歌上进行大量搜索后发现,有一些方法可以使用 PreviewHandlers 实际预览文件,但管理层不希望这样做一个解决方案。

因此,如果没有它,我们只能将文档转换为 XPS 并使用它们在 DocumentViewer 中预览,其中所有工具都可用。

对于 PDF 文件,Acrobat 提供了一个很好的 COM 组件。这里的问题是我能够将 doc、docx 文件转换为 xps 以将它们显示为预览,但无法将任何其他文件转换为 xps。

或者一个将所有文件转换为 pdf 的库也可以。

如果有人以前遇到过这个问题或者知道解决方案/第三方库可以转换文档,那么我们非常感谢您的帮助。

谢谢

I have an application that i am working on which needs actually a file preview in a preview pane so because of that after searching a lot on google found that there are some ways to actually preview the files using PreviewHandlers but management does not want that to be a solution.

So without that we can only be left with converting the documents to XPS and use them to preview in DocumentViewer where all the tools are available.

For PDF file Acrobat provides a COM component that is fine. The problem here is i am able to convert doc,docx files to xps to show them as preview but not able to convert anyother files to xps.

Or a library that converts all files to pdf that also is fine.

if someone has faced this before or know the solution/Third party library that does the work to convert the documents then the help is really appreciated.

Thanks

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文