以编程方式打印 PDF 文件 - 指定打印机

Gre*_*reg 5 python printing pdf

我需要从 Python 脚本打印现有的 PDF 文件。

我需要能够在脚本中指定打印机。它在Windows XP 上运行。

有什么想法我可以做什么吗?

此方法看起来可行,只是我无法指定打印机:

win32api.ShellExecute (
  0,
  "print",
  filename,
  None,
  ".",
  0
)
Run Code Online (Sandbox Code Playgroud)

小智 1

看起来 blueish 对此发表了评论,但没有留下答案。

安装 Ghostprint http://pages.cs.wisc.edu/~ghost/gsview/gsprint.htm

然后使用问题中的命令

使用python的win32print模块打印PDF文档?