I'm using following command in PHP to convert a PDF with RBG colors to CMYK colors:
$input = PDF_DIR . 'input.pdf';
$output = PDF_DIR . 'output.pdf'
exec("'gs'
'-sDEVICE=pdfwrite'
'-dUseCIEColor'
'-sProcessColorModel=DeviceCMYK'
'-sColorConversionStrategy=CMYK'
'-sColorConversionStrategyForImages=CMYK'
'-sOutputFile=$output'
'$input'
");
I am using Ghostscript version 8.71.
gs -v
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
Somehow the result is always an empty pdf file. Does anyone know what I'm doing wrong?
Thanks in advance for any answers, Cheers!
Some references: