是否可以使用 ColdFusion 将 Microsoft Word 文档转换为 PDF?
上面的问题已经说明了一切。我知道您可以使用 CFPDF 在 ColdFusion 8 中从图像文件或 HTML 创建 PDF,但我想知道是否可以直接在 CF8 或 CF9 中从 MS Word 文档创建 PDF。
您能否导入Word文档并将其转换为HTML或图像文件,然后进行转换?或者有什么捷径吗?
The above question says it all. I know you can create a PDF from an image file or HTML in ColdFusion 8 using CFPDF, but I'm wondering if it's possible to create a PDF from a MS Word document directly - in CF8 or CF9.
Could you import the Word document and convert it to HTML or an image file, and then do the conversion? Or is there a shortcut?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请参阅文档:Office 文件互操作性 - 使用 cfdocument
see Doc: Office file interoperability - Using cfdocument
在 CF8 中,您可能可以使用 COM 对象集成或 POI 集成来做一些事情,但这并不简单/直接。
使用 Word 的另存为功能将其转换为 HTML 可能是使用 CF8 的最简单途径。不过,我建议 Henry 的想法是正确的,升级到 CF9 以利用 OO.O 集成。
编辑:感谢@jarofclay,我现在知道 POI CFC 包装器已更新为包含 Word 文档。我记得它只支持 Excel,但这显然已经改变了。嗯,现在改变我对 CF8 中如何执行此操作的投票是否为时已晚?
In CF8, you could probably do something with COM object integration or POI integration, but it would not be simple/straightforward.
Converting it to HTML using Word's save as feature is probably the simplest route using CF8. I'll suggest that Henry has the right idea, though, upgrading to CF9 to take advantage of OO.O integration.
Edit: Thanks to @jarofclay, I now know that the POI CFC wrapper has been updated to include Word docs. I remembered it only supporting Excel, but that's clearly changed. Um, is it too late for me to change my vote for how to do this in CF8?
我对 CF 一点也不熟悉,但如果您可以从中进行 Web 服务调用,请尝试 此产品。它依赖于 MS-Office 而不是 Open Office,因此提供了更好的转换保真度。它还支持其他格式,包括 Infopath、Excel、PowerPoint 等以及 水印支持。
请注意,我曾开发过该产品,因此通常的免责声明适用。
I am not at all familiar with CF, but if you can make web service calls from it then try this product. It relies on MS-Office rather than Open Office so provides much better conversion fidelity. It also supports additional formats including Infopath, Excel, PowerPoint etc as well as Watermarking support.
Please note that I have worked on this product so the usual disclaimers apply.