I am using Ghostscript to print a PDF by command line arguments. But it shows the printed document's name as Ghostscript output in printer spooler. I want to change it to a custom name . for that i have tried a command : gswin32c -dNOPAUSE -dBATCH -c "mark /UserSettings <</DocumentName (MyDocName)>> (mswinpr2) finddevice putdeviceprops setdevice" -f -sOutputFile="%printer%Test" "-sPAPERSIZE=a4 test.pdf it is solving the problem but creating a new ie. it always give "letter" as the output page size so suggest me the way by which i can achieve both goals Thanks