8

次のコマンドを使用してPDFを印刷しています。

acroRD32.exe /t "file1.pdf" "printerName"

すべて正常に動作しますが、1つのウィンドウがポップアップします。誰かが私がそれを無効にするのを手伝ってくれますか?この質問に含まれているさまざまなオプションを試してみまし たが、成功しません。

どんな助けでも大歓迎です。

4

3 に答える 3

2

コマンドラインから最後に開いたAcrobatウィンドウを閉じることはできません。Acrobatのプログラミングスクリプトの古代の歴史から、Acrobatスクリプトでもこれを行う方法はないと思います。

ただし、少し複雑ですが、コマンドラインからAcrobatを閉じることができます。ほとんどのWindowsシステムの純粋なMSDOSメソッドの場合、 called.batcaller.batの2つのファイルを作成します。

caller.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

called.bat

"path\to\the\program\acroRD32.exe" /t "path\to\the\program\file1.pdf" "printerName"

exit

同じタスクをよりエレガントに実行する多くのプログラミング言語でスクリプトを記述できることに注意してください。

于 2011-12-18T18:36:40.473 に答える