I'm having trouble executing the following command silently in GhostScript:
-q -dBATCH -dNOPAUSE -dNODISPLAY -c "mark /NoCancel true /OutputFile (\\spool\ServerName\PrinterName) /UserSettings << /DocumentName (test)>> (mswinpr2) finddevice putdeviceprops setdevice" -f "c:\test.pdf" "c:\test2.pdf"
The command doesn't execute silently, it keeps prompting me to select a printer, so I suspect the OutputFile property may be an issue here. Before, I had another command that worked perfectly (see below), but the requirement for setting the documentName forced me to alter it:
-dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -sDEVICE=mswinpr2 -sOutputFile="\\spool\\ServerName\PrinterName" "c:\test.pdf" "c:\test2.pdf"
Can anyone point me in the right direction? Just to be clear, the command does work after confirming the printer prompt. I would prefer an inline solution as this command is called from managed code with the documentName being dynamic