If you use Ghostscript on Windows, you'll have two executables:
The first one is to be run from inside a 'DOS box' (i.e.
cmd.exe window) -- either interactively or not. It prints all stderr/stdout messages into the cmd.exe window and also expects any input commands to be typed in there.
The second one opens a separate Window for "interactivity': prints stderr/stdout to separate window, and expects commands there.
To avoid the 'prompt to type in', you have to use the right commandline parameters when you call either one of the commands. For example:
gswin32c.exe -dBATCH -dNOPAUSE
-dNOPAUSE processes all pages of the input file (instead of pausing after each one).
-dBATCH avoids the return to the
gs> prompt after the last page.
A complete command for Ghostscript to test your PDF would be (inside a DOS box) to run
gswin32c -o nul -sDEVICE=nullpage c:/path/to/input.pdf
-o parameter implicitly uses
-sDEVICE=nullpage doesn't do any conversion and doesn't write an output file. But it makes Ghostscript to run all the rendering commands of the input PDF. Should the input be invalid, Ghostscript will tell you with its stdout/stderr messages.