Following the answers to this post I get the following script:
#!/bin/bash gs \ -sOutputFile=/tmp/output.pdf \ -sDEVICE=pdfwrite \ -sColorConversionStrategy=Gray \ -sColorConversionStrategyForImages=Gray \ -dProcessColorModel=/DeviceGray \ -dCompatibilityLevel=1.4 \ -dNOPAUSE \ -dBATCH \ $1 mv /tmp/output.pdf $1
identify -verbose file.pdf | grep Colorspace afterwards shows
I want to make these true grayscale PDFs, and have the Colorspace be set to gray. I have one PDF that reports gray, but I don't know how to make ghostscript convert the other ones to be like it.