I am trying to convert a PDF file to PDF/A, in two Ubuntu servers. The first one has GhostScript 9.05 installed, that works. But my new Ubuntu server, with GhostScript 9.10, not works. I am executing the following command line:
gs -dPDFA -dBATCH -dNOPAUSE -dPDFSETTINGS=/screen -dUseCIEColor -dPDFNOCIDFALLBACK -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -r200x200 -sPDFACompatibilityPolicy=1 -sOutputFile="uploads/file.pdf" "uploads/pdfa/file.pdf" >> uploads/pdfa/convert.log
Then I receive the error:
GPL Ghostscript 9.10: ColorConversionStrategy is incompatible to ProcessColorModel.
This goes back to what I keep telling people; don't use PDFSETTIGNS unless you know precisely what it is doing, ie understand and approve all the settings.
In this case PDFSETTINGS=/screen sets ColorConversionStrategy to /sRGB and then you set the ProcessColorModel to CMYK.
RGB does not equal CMYK so you get an error.
You should also upgrade to a more recent version, and then you wouldn't have to specify ProcessColorModel.