embed icc color profile in ps2pdf ghostscript

827 Views Asked by At

hi im trying the following with ghostscript 9.18 on windows 10:

CALL "C:\Program Files\gs\gs9.18\bin\gswin64c.exe" ^
-dNumRenderingThreads=8 ^
-dSAFER ^
-r720 ^
-dCompressFonts=true ^
-dPDFSETTINGS=/prepress ^
-dPDFA=2 ^
-dBATCH ^
-dNOPAUSE ^
-sProcessColorModel=/DeviceRGB ^
-dProcessColorModel=/DeviceRGB ^
-sColorConversionStrategy=/UseDeviceIndependentColor ^
-sDefaultGrayProfile="C:\Program Files\gs\gs9.18\iccprofiles\ISOcoated_v2_grey1c_bas.ICC" ^
-sDefaultRGBProfile="C:\Program Files\gs\gs9.18\iccprofiles\sRGB_v4_ICC_preference.icc" ^
-sDefaultCMYKProfile="C:\Program Files\gs\gs9.18\iccprofiles\PSOuncoated_v3_FOGRA52.icc" ^
-dOverrideICC=true ^
-sOutputICCProfile="C:\Program Files\gs\gs9.18\iccprofiles\sRGB_v4_ICC_preference.icc" ^
-sDEVICE=pdfwrite -sOutputFile="%~n1.pdf" %1
pause

but it fails, it writes without error, but no ecc profile will be included, no matter what input. please can someone help? i found other topics but no real answer...

1

There are 1 best solutions below

0
On

I answered this question on the #ghostscript channel on irc.freenode.net yesterday. The command line has a number of problems:

-dNumRenderingThreads has no effect on any high level device, since they don't render

You should not set the resolution on high level devices unless you anticipate that there will be rendered output (PDF transparent input to a version of PDF < 1.4). If you do set resolutoin you should not set it to the default, that's just pointless.

In general I would not use PDFSETTINGS, especially when trying to create a PDF/A file. If you order the command incorrectly the result will not be a valid PDF/A file.

You have set ProcessColorModel twice, once each with the name and string syntax switches, and the string switch is incorrect.

You have set ColorConversionStrategy using the string switch (-s) but have supplied a name. That won't work and will have no effect.

You absolutely do not want to set OverrideICC or OutputICCProfile and unless you are working in a tightly controlled colour managed workflow (and I know you are not) then you should not set the Default ICC profiles.

All this is for the benefit of anyone else who should happen across this question. Do not copy the command line above thinking its useful, it isn't.

As already explained to the poster on IRC, his output file does include an ICC profile. Since he doesn't appear to understand colour management or PDF, he is unable to explain what he wants (or why) other than to say he wants to include an ICC profile 'for a professional result'.