将数据库字段和多个单词文档合并为单一可打印格式的解决方案
对于我正在开发的一个项目,我需要执行一键“打印全部”功能,该功能将允许我的用户对多个数据库字段进行可打印视图,并结合在数据库中存储为 blob 数据的 2 个 word 文档。我已经考虑过使用 openxml 库,但打开我的一些 Word 文档时遇到问题。我也在考虑使用水晶报告,但我对水晶不太熟悉,我还没有找到任何关于如何从 blob 存储中包含 word 文档的好例子。
因此,我正在寻找有关执行此操作的最佳方法的建议。我已经研究过的选项是最佳选项吗?或者有更好的方法吗?
For a project that I'm working on, I need to do a one click "print all" feature that will allow my users to do a printable view of several database fields, combined with 2 word documents that are stored as blob data in database. I've looked at using the openxml library, but it was having trouble opening up some of my word docs. I was also looking at using crystal reports, but I'm not terribly familiar with crystal I haven't found any good examples on how to include word docs from blob storage.
So I'm looking for suggestions on the best way to go about doing this. Are the options that I've already looked into the best options? Or is there a better way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您没有很多钱来操作一些商业库,例如 Aspose.Words for .NET ,并且您根本不喜欢 openxml 库。那么,在我看来,你最好的选择就是放置一些低级的东西。只需考虑到任何 openxml 文档都只是一个 .zip 存档。因此,您应该解压缩它,并在这个包中查找 word 文件夹,您应该在其中定义 document.xml 文件。它将包含您的文档本身。此外,您应该只解析此 xml 以找出您的数据。
If you haven't a lot of money for operating with some commercial libraries, like Aspose.Words for .NET , and you don't like openxml library at all. Then, in my opinion, your best choice is laying in some low-level stuff. Just take into account that any openxml document is just a .zip archive. So, you should uncompressed it, and inside this package look up for a word folder where you should define document.xml file. It will contain your document itself. Further, you should just parse this xml to find out your data.