windows - 将 GDI 转换为 XPS 时,抑制 Microsoft XPS Document Writer 上的“另存为”对话框

标签 windows printing gdi xps

在他的博客条目中 Printing documents to Microsoft XPS Document Writer without user interaction冯远说

If you're printing from your own applications, it's easy to specify MXDW as the printer driver and provide a file name for the XPS document to be saved to

任何人都可以解释如何做到这一点并提供代码示例吗?

我遇到的主要问题是抑制 Microsoft XPS Document Writer 弹出的“另存为”对话框。我讨厌像 Yuan 在他的帖子中那样诉诸 UI hacking。

目前,我的应用程序在用户想要使用的任何打印机的设备上下文上进行 GDI 绘图调用。我可以在 XPS Document Writer 上进行这些调用,但当需要完成打印时,XPS Writer 会弹出另存为对话框。

最佳答案

确实是同一个作者提供了答案Printing to Microsoft XPS Document Writer without showing File Save Dialog Box .解决方案是使用 Microsoft XPS Document Writer 打印机打印到文件。

关于windows - 将 GDI 转换为 XPS 时,抑制 Microsoft XPS Document Writer 上的“另存为”对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/810550/

相关文章:

javascript - 如何在windows中获取实时时间

.net - 如何查询DOTNET_CLI_TELEMETRY_OPTOUT是否永久设置为TRUE?

printing - 在 Kiosk 模式下通过 Chrome 应用运行静默打印

java - 如何在 Java 中获取 Activity 连接的打印机?

c++ - 关于 GDI/GDI+ 坐标兼容性?

python - 我安装了python 3.5.2(64位),pip版本是9.0.1,但是当我尝试安装tensorflow时,它说找不到版本,为什么是:(the

c - Windows 操作系统中命名信号量的位置是什么

java - 如何判断打印作业是否完成?

c# - 截取桌面 C# (WPF) 屏幕截图时出现延迟

c++ - 如何用字体计算多字符串的宽度和高度?