我正在使用 Delphi 的 winapi ShellExecute 尝试打印到用户选择的打印机而不是默认打印机。我正在尝试找出使用 printto 动词的命令的语法。
如果我想将 manual.pdf 打印到 IP 地址为 192.168.1.49 的 HP Laser Jet 4,示例 shell 执行语句会是什么样子?
(这只是一个例子,但如果你能帮助我,我可以从那里开始)
最佳答案
您需要在arguments参数中传递打印机的网络网络地址。
ShellExecute(
WindowHandle,
'printto',
PChar(DocumentName),
PChar(PrinterNetworkAddress),
nil,
SW_HIDE
);
关于delphi - 使用shellexecute时 "printto"的参数是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10898712/