#28399

So the print jobs are going to be initiated from the server side (not from client PC)? In the case you’ll anyway need to execute some print command line. I have my doubts if there is an easy way to talk from an application server to a printer (and to render/print a PDF, which is another level of complexity).

As for me a print.bat file with a singe command like
AcroRd32.exe /t %1 “\serverprintername” “Kyocera FS-1010” “192.168.0.1”
is quite a straightforward solution to be executed from the server like that:

[language=java:2hutn6hr]String cmdstart[] = { “cmd.exe”, “/c”, “print.bat”, tempPdfLocation };
Runtime.getRuntime().exec(cmdstart);[/language:2hutn6hr]
Of course, printer names/locations could be passed to the script as a parameter as well.