I have a PDF with an sRGB color profile, and I would like to convert this to a different RGB color profile. So far I have tried to use ghostscript with various parameter values with no luck--for example I have attempted the following:
gs \
-dSAFER \
-dBATCH \
-dNOPAUSE \
-dNOCACHE \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=RGB \
-dProcessColorModel=/DeviceRGB \
-sOutputICCProfile=/colorprofiles/custom/AppleRGB.icc \
-sOutputFile=output.pdf \
input.pdf
The command above runs without error but leaves the color space unaffected; the output.pdf still has the original sRGB color profile embedded.
Is such a conversion possible with ghostscript (or some other tool that can be used programmatically)? If so, where am I going wrong?