如何使用 C# 以编程方式将 .Doc 转换为 Tiff/Jpeg?

发布于 2024-09-05 23:42:17 字数 154 浏览 0 评论 0原文

我需要找到一种使用 C#/.NET 将 Word Doc 文件转换为 Tiff 文件的 Jpeg 的方法。我无法使用任何虚拟打印驱动程序,例如 Microsoft Office Document Imaging。我只能使用 C# 和/或 C++ 库。有没有免费的方法或 API 可以实现这一点?

I need to find a way of converting Word Doc files to Jpeg of Tiff files using C#/.NET. I cannot use any virtual printing drivers such as Microsoft Office Document Imaging. I can only use C# and/or C++ Libraries. Are there any free methods or APIs to accomplish this?

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

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

发布评论

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

评论(1

本王不退位尔等都是臣 2024-09-12 23:42:17

您必须先将其转换为某种格式 - 例如 PDF。然后您可以运行 Ghostscript 将其转换为 jpg/tiff 文件。

您可以用 C# 编写一个程序,

  • 打开 Word,将文件夹中的所有文档打印到 PDF 驱动程序并关闭,
  • 然后使用 GhostScript 将文件夹中的所有 PDF 转换为 tiff/jpeg,
  • 然后删除所有中间 PDF 文档。

我知道你说你不能使用虚拟打印驱动程序,但我很确定你必须这样做。

You have to convert it to something first - such as PDF. Then you can run ghostscript to convert it to your jpg/tiff files.

You can write a program in c# that..

  • opens word, prints all docs in a folder to PDF driver and closes,
  • and then converts all PDFs in folder to tiff/jpeg using ghostscript,
  • and then deletes all intermediate PDF Docs.

I know you say you can't use a virtual printing driver but I'm pretty sure you have to.

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