I have been struggling with this for a few days, so I thought I'd ask for help here...
Basically, I'm trying to use ps2pdf (version 9.10) to create correct PDF/X-1 and PDF/X-3 documents. Yes, I know that ps2pdf is said to only support PDF/X-3 (see this thread and this thread and this thread). However, as PDF/X-1 is basically a subset of PDF/X-3, I guess such a conversion should be possible. Also, using the command...
gs -sDEVICE=pdfwrite -dPDFX -dBATCH -dNOPAUSE -dNOOUTERSAVE -sProcessColorModel=DeviceCMYK -sOutputFile=out.pdf PDFX_def.ps in.pdf
I noticed that the colors of the PDF/X-3 files that I'm creating are converted to CMYK, instead of leaving them in RGB (which should be the case with PDF/X-3). So, technically, the files are now PDF/X-1: Which I can confirm by adding "/GTS_PDFXVersion (PDF/X-1a:2003)" to PDFX_def.ps and running the file through Adobe's Preflight.
Which brings me to the first part of the question: How can I prevent the RGB colors that are defined in the original PDF document to be converted to CMYK? The switch "-dColorConversionStrategy=/LeaveColorUnchanged" doesn't seem to have any effect. (Actually, I read here that such a conversion isn't even possible. So, why is it happening? Or is this outdated information?)
Secondly, why does the documentation say that "RGB is not allowed" in combination with "-dPDFX"? Isn't this what PDF/X-3 is all about?
Thirdly, is it possible to also create PDF/X-4 documents that pass Adobe's preflight?
By the way, here's my PDFX_def.ps file:
%!
% $Id$
% This is a sample prefix file for creating a PDF/X-3 document.
% Feel free to modify entries marked with "Customize".
% This assumes an ICC profile to reside in the file (Blurb_ICC_Profile.icc),
% unless the user modifies the corresponding line below.
systemdict /ProcessColorModel known {
systemdict /ProcessColorModel get dup /DeviceGray ne exch /DeviceCMYK ne and
} {
true
} ifelse
{ (ERROR: ProcessColorModel must be /DeviceGray or DeviceCMYK.)=
/ProcessColorModel cvx /rangecheck signalerror
} if
% Define entries to the document Info dictionary :
/ICCProfile (ISOcoated_v2_300_eci.icc) def % Customize or remove.
[ /GTS_PDFXVersion (PDF/X-3:2002) % Must be so (the standard requires).
/Title (Title) % Customize.
/Trapped /False % Must be so (Ghostscript doesn't provide other).
/DOCINFO pdfmark
% Define an ICC profile :
currentdict /ICCProfile known {
[/_objdef {icc_PDFX} /type /stream /OBJ pdfmark
[{icc_PDFX} <</N systemdict /ProcessColorModel get /DeviceGray eq {1} {4} ifelse >> /PUT pdfmark
[{icc_PDFX} ICCProfile (r) file /PUT pdfmark
} if
% Define the output intent dictionary :
[/_objdef {OutputIntent_PDFX} /type /dict /OBJ pdfmark
[{OutputIntent_PDFX} <<
/Type /OutputIntent % Must be so (the standard requires).
/S /GTS_PDFX % Must be so (the standard requires).
/OutputCondition (ISOcoated_v2_300_eci.icc) % Customize
/Info (Info) % Customize
/OutputConditionIdentifier (Custom) % Customize
/RegistryName (http://www.color.org) % Must be so (the standard requires).
currentdict /ICCProfile known {
/DestOutputProfile {icc_PDFX} % Must be so (see above).
} if
>> /PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFX} ]>> /PUT pdfmark
Thanks in advance!