My computer runs on Windows 7 with MikTeX 2.9 and GhostScript 9.02 installed.
I am still confused why do I have to invoke gswin64c.exe
rather than ps2pdf.exe to convert ps to pdf?
The switches I want to use are
-sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=filename.pdf -c save pop -f filename.ps
When I use ps2pdf.exe with the switch above, it got error message as follows.

Experiment results based on Philippe's comment as follows.
Not working syntax:
ps2pdf -sPAPERSIZE=a4 in.ps out.pdfps2pdf -sPAPERSIZE#a4 in.ps
Working syntax:
ps2pdf -sPAPERSIZE#a4 in.ps out.pdfps2pdf in.ps out.pdfwith top margin gets cropped.ps2pdf in.pswith top margin gets cropped.