静默使用 Microsoft XPS Document Writer 打印机创建 XPS [英] Silently use Microsoft XPS Document Writer printer to create XPS

查看:93
本文介绍了静默使用 Microsoft XPS Document Writer 打印机创建 XPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天来,我一直在努力在没有对话框的情况下将 XPS 打印到文件.我在 CodeGuru 和 Feng Yuan (MSDN) 上阅读了有关此事的帖子,以及这里的许多讨论主题,但我仍然迷失了方向.

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.

特别是我的情况是我有一个必须使用的 3rd 方 API,它打印到默认打印机(比如 Microsoft XPS Document Writer).我希望能够在打印程序之前应用"一个文件名,当然没有对话框.

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.

我尝试过使用 WinDDK - XPSDRV 和 LOCALMON 示例,但无法弄清楚如何操作代码以实现我的目标.(甚至完全了解我是否需要新的打印机驱动程序或新的端口类型)

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)

推荐答案

您将删除管道 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

亲切的问候

这篇关于静默使用 Microsoft XPS Document Writer 打印机创建 XPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆