Resize A4 PDF to SRA4 and center content

I found a solution, by using -c "<</PageOffset [21 32]>> setpagedevice", like so:

gs -dPDFSETTINGS=/default -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite 
-sOutputFile=out.pdf -dDEVICEWIDTHPOINTS=637 -dDEVICEHEIGHTPOINTS=907 
-dFIXEDMEDIA -c "<</PageOffset [21 32]>> setpagedevice" -f in.pdf

Content is perfectly centered in the SRA4 document.