1.

Solve : Problem with printing multiple pdf-files via batch file?

Answer»

For work I need to print around 360 different pdf-files. the printing is done via a batch file, containing the following code:

ECHO OFF

if %1 == WORD GOTO WORD

if %1 == EXCEL GOTO EXCEL

if %1 == PDF GOTO PDF

echo No valid document specified to print
GOTO END

:WORD
echo Printing with Word
"c:\Program Files\Microsoft Office\Office\WinWord" %2

GOTO END

:EXCEL
echo Printing with Excel
"c:\Program Files\Microsoft Office\Office\EXCEL" %2 /mAirmadprint

GOTO END

:PDF
echo Printing with Acrobat Reader
"C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" /t %2
GOTO END

:END
CLS


Now the problem is that every pdf-file that opens to be printed, doesn't automatically close ANYMORE, which it normally needs to do thanks to /t. So I have to manually close every pdf-flie that needs to be printed.
Is it a problem of my code or with acrobat, that the pdf-files aren't closed automatically?

I'm using Windows XP professional SP2 and acrobat reader 7.0.8. Keep in mind that I can't update the programs, since this is a company computer.

Thanks in advanced.
You have left out some parameters. See below

http://support.adobe.com/devsup/devsup.nsf/docs/51412.htm

Thanks for your reply and I have found the solution.
Apparently there was nothing WRONG with the code, those extra parameters weren't necessary at all. The solution is that you already need to open a acrobat reader window before you start printing and then you will obtain a continuous loop of opening, printing and CLOSING the MULTIPLE pdf-files. Very simple, but ALSO very weird.

But still many thanks for your help!



Discussion

No Comment Found