use*_*194 7 command-line adobe-reader
我使用以下cmd打印pdf:
acroRD32.exe /t "file1.pdf" "printerName"
Run Code Online (Sandbox Code Playgroud)
一切正常,但会弹出一个窗口.任何人都可以帮我禁用它.我尝试了这个问题中包含的各种选项, 但不能成功.
任何帮助表示赞赏.
您无法通过命令行关闭最后打开的 Acrobat 窗口。从 Acrobat 编程脚本的古老历史来看,我相信在 Acrobat 脚本中也没有办法做到这一点。
但是您可以从命令行关闭 Acrobat,尽管这有点复杂。对于大多数 Windows 系统的纯 MSDOS 方法,请创建两个文件:Called.bat和caller.bat。
来电者.bat:
REM call the batch file that runs the program:
start "ProgramRunner" called.bat
REM wait 5 seconds -- if this closes Acrobat too soon, then increase the time:
ping 1.1.1.1 -n 1 -w 5000 >nul
REM kill the called program -- should be the program name that was started in called.bat:
REM (If the program does not close, type "taskkill /?" in the command line to see options.)
taskkill /F /IM acroRD32.exe
Run Code Online (Sandbox Code Playgroud)
称为.bat
"path\to\the\program\acroRD32.exe" /t "path\to\the\program\file1.pdf" "printerName"
exit
Run Code Online (Sandbox Code Playgroud)
请注意,您可以使用多种编程语言编写脚本,从而更优雅地完成相同的任务。