TJR, you can try playing with adding one of the following command line options to your Ghostscript call:
-dAutoRotatePages=/None -dAutoRotatePages=/All -dAutoRotatePages=/PageByPage
If this does not change the result, try this instead:
gswin32c.exe ^ -oc:/path/to/output.pdf ^ -sDEVICE=pdfwrite ^ -dPDFSettings=/prepress ^ -dAutoRotatePages=/None ^ -c "<</Orientation 0>> setpagedevice" ^ -f /path/to/first.pdf ^ /path/to/second.pdf ^ /path/to/third.pdf
The /Orientation 0 should turn all pages into a portrait. Using 3 should make it landscape ( 1 for a seascape, 2 for an inverted part).
However, this will not work reliably, because (some of) your source files may contain strange settings for page orientation and rotation. In this case, only "repair" of the source files will be able to fix this one by one ....
source share