0
votes

I am trying to print pdf file silently from command line (Windows7)and this is what I am using, but I get "gswin32.exe has stopped working." error message.

gswin32c.exe -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -dNoCancel -sOutputFile="%printer%Samsung M2020 Series" "c:\test.pdf"

I tried the above in other machine, but same result.

The following line prompts the print dialogue box which I don't want.

gswin32c.exe -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -dNoCancel -sOutputFile=\\spool "c:\test.pdf"

Is it possible to print silently using ghostscript?

thanks,

3

3 Answers

0
votes

I installed GSView and this worked: gsprint -noquery -all -printer "Samsung M2020 Series" "c:\scannedDocOnePage.pdf"

0
votes
gswin32c.exe -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -sOutputFile="%printer%Samsung M2020 Series" file.pdf
0
votes

I was able to get a silent print by removing -sOutputFile and use -dQueryUser=3 instead. This will always print to the default printer set up in control panel though.

"C:\Program Files\gs\gs9.52\bin\gswin64c.exe" -dNORANGEPAGESIZE -dPrinted -dNoCancel -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=1 -dQueryUser=3 -sDEVICE=mswinpr2  "mypdf.pdf"