打印 BLOB 文档
我正在尝试找到一种方法来打印存储为 BLOB 的文档,而无需先打开它,文件名也被存储,因此我有可用的文件扩展名。我唯一的想法是将其保存在用户临时文件夹中,然后将 PrintDocument 类指向它,但我确信有更好的方法可以做到这一点。
感谢所有贡献者。
I am trying to find a way to print a document that is stored as a BLOB without having to first open it, the filename is stored as well so I have the extension of the file available. The only idea I have had is to save it in the users temporary folder and then point the PrintDocument class to it but im sure theres a better way of doing it then that.
Thankyou to all who contribute.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
既然您有文件名,您可以尝试使用 ShellExecute 打印该文件。不过,您必须将其保存到临时位置。
我还认为它与使用 PrintDocument 没有太大区别,因为它也使用文件类型的默认打印操作。另外,我认为你必须pinvoke它。
since you have the filename, you could try using ShellExecute to print the file. you would have to save it to a temporary location, though.
I also think it wouldn't be that much different from using PrintDocument, as it also uses the default Print action for the file type. Also, i think you will have to pinvoke it.