GPL Ghostscript 9.10: ColorConversionStrategy is incompatible to ProcessColorModel

2.7k views Asked by At

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.
2

There are 2 answers

1
KenS On

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.

0
mjan On

Ghostscript was upgraded to version 9.16 in my server, as KenS said in his answer. I have tried many parameters combinations. The command line that worked to me was:

gs -dPDFA -dBATCH -dNOPAUSE -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile="output.pdf" input.pdf