I've a problem with that command line : 

`gswin32c.exe -sDevice=pdfwrite -sOutputFile=out.pdf -dNOPROMPT -dNODISPLAY -dNOPAUSE doc.prn-q -c quit`

The program runs without any error.If I enable the display option, i can see the Ghostscript image of my document but my PDF is not generated.

Any Ideas ? 

***Solved*** 

`gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=doc.pdf doc.prn -c quit`