静默使用 Microsoft XPS Document Writer 打印机创建 XPS
几天来,我一直在努力在没有对话框的情况下将 XPS 打印到文件。 我读过 CodeGuru 和 Feng Yuan (MSDN) 中有关此事的帖子,以及这里的许多讨论主题,但我仍然迷失。
具体来说,我的场景是我必须使用一个第三方 API,它会打印到默认打印机(例如 Microsoft XPS Document Writer)。我希望能够在打印过程之前“应用”文件名,当然没有对话框。
我尝试过使用 WinDDK - XPSDRV 和 LOCALMON 示例,但无法确切地弄清楚如何操作代码来实现我的目标。 (甚至完全了解我是否需要新的打印机驱动程序或新的端口类型)
For some days now I've been battling with printing XPS to file without the dialog.
I've read posts on the matter in CodeGuru and by Feng Yuan (MSDN), along with many discussion topics here and I am still lost.
Specifically my scenario is that I have a 3rd party API that I must use, and it prints to the default printer (say Microsoft XPS Document Writer). I want to be able to "apply" a filename prior to the printing procedure, and of course not to have dialog.
I've tried working with WinDDK - XPSDRV and LOCALMON samples but wasn't able to figure out exactly how to manipulate the code to achieve my goals. (or even fully understand if I need a new printer driver or a new port type)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的需求。以下是为我提供所需功能的一些逻辑:
I ran into the same need. Following is some of the logic that provides the desired functionality for me:
您将删除管道 xml 中的过滤器以及 inf 文件中的相关 dll。但是,正如我所做的那样,我想您将面临打印画布(图形)的问题。我无法将此画布转换/转换为字形以获取其内容。
如果您还有其他问题,请告诉我
亲切的问候
You will delete filters in pipeline xml and also related dll's in inf file. But yet, as I did, i guess you will face problem of printing canvas (graphics). I wasn't able to convert / transform this canvas to glyphs to get the contents of it.
If you had further issues, let me know
Kind Regards