【问题标题】:are there some way to print by xps printer without show the save dialog?有什么方法可以通过 xps 打印机打印而不显示保存对话框?
【发布时间】:2014-01-09 14:06:25
【问题描述】:

我正在尝试通过 XPS PRINTER 打印,但没有保存对话框。

我在 VB6 上使用打印机对象。

有什么想法吗?

【问题讨论】:

  • 尝试Printer.Print方法,看看是否直接将数据发送到默认打印机。
  • 默认打印机不必是实际的物理设备。根据您的计算机,您可以选择将文档作为传真发送,或者在打印时将它们保存为 PDF 或 XPS 文件。
  • 是的,我知道...但我已经使用 Printer 对象来构建我的报告。我只需要在选择的打印机是 XPS 打印机时隐藏保存对话框。

标签: printing vb6 dialog report


【解决方案1】:

无法从 VB6 控制 XPS Document Writer 文件名,但可以使用名为 Win2PDF 的第三方产品。在 Win2PDF 中 set the XPS file name 使用 SaveSetting 方法将文件名保存到注册表中:

SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFFileName", "c:\test\test.xps"

在密钥设置为“PDFFileName”的情况下调用 SaveSetting 后,您使用 VB6 打印机对象打印到 Win2PDF 打印机以创建 XPS 文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多