Following recommendations from a variety of discussion (see below), I have attempted to use ghostscript to convert a PDF file in an sRGB colorspace (generated by Inkscape) into a PDF/X-1a file, in a CMYK colorspace.
The command I have used is the following:
gs -dBATCH -dNOPAUSE -dPDFA -sDEVICE=pdfwrite \ -sDefaultCMYKProfile=/usr/share/color/icc/colord/SWOP_TR005_coated_5.icc \ -sOutputICCProfile=/usr/share/color/icc/colord/SWOP_TR005_coated_5.icc \ -sProcessColorModel=DeviceCMYK \ -sColorConversionStrategy=CMYK \ -sColorConversionStrategyForImages=CMYK \ -dRenderIntent=3 -dDeviceGrayToK=true \ -dOverrideICC -dPDFACompatibilityPolicy=1 \ -o cmyk.pdf rgb.pdf
Some of these switches may be unnecessary. Mostly, I am ignorant of their function, but have copied them from various sources in an attempt to find some solution to the application consistently generating files with sRGB output, rather than CMYK, as desired.
The sRGB color profile in the output is confirmed by ImageMagick, as follows:
$ identify -verbose cmyk.pdf Image: cmyk.pdf Format: PDF (Portable Document Format) Mime type: application/pdf Class: DirectClass Geometry: 72x72+0+0 Resolution: 72x72 Print size: 1x1 Units: Undefined Colorspace: sRGB Type: PaletteAlpha Base type: Undefined Endianess: Undefined Depth: 16/8-bit <full content truncated>
Note that ghostcript is version 9.50, and is running under Linux Mint 20.0.
What might be a better usage of the application, to produce CMYK output?