4

The print house requires my dissertation's PDF to be compliant with PDF/X1a:2001. The content file was compiled using XeTeX LaTeX and the second PDF is the cover design done with Inkscape 0.48.

The nearest answer I found in this post: https://stackoverflow.com/a/3483801/1288722, and if I rightly understood, this can be done at least to convert the PDF to PDF/X using Ghostscript.

As stated in the answer above, conversion to PDF/X requires a valid ICC profile. I contacted the printing house and they provided a file of their preferred one which is: ISOcoated_v2_300_eci.icc. I added the .icc file to same folder of the target pdf files (thanks to VadimR for this remark).

Ghostscript
I used this script from command line but it didn't work:

gswin32c -dPDFX -dBATCH -dNOPAUSE -dNOOUTERSAVE -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sOutputFile=outputfile.pdf PDFX_def.ps doctorate.pdf  

I took some time to do 220 pages but it was awful, undesirable effect.

Contents of the PDFX_def.ps:

%!
% 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 (ISO Coated sb.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.
%/ICCProfile (ISO Coated sb.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 (Commercial and specialty printing) % Customize
  /Info (none)                     % Customize
  /OutputConditionIdentifier (CGATS TR001)      % 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

So what am I missing?

Notes

  • Windows 7 32bit
  • No commercial programs are desired
Community
  • 1
  • 1
doctorate
  • 1,381
  • 1
  • 19
  • 43
  • That error message says only that GS can't find your ICC profile. Put it into current directory (same as input file's). I think you also need to change `(PDF/X-3:2002)` to `(PDF/X-1a:2001)` and add `-sColorConversionStrategy=CMYK`. Look [here](http://ghostscript.com/doc/current/Ps2pdf.htm#PDFX) for additional parameters that may be required. Note, that if input _does_ contain RGB and the file is color critical (and even something as simple as getting pure Black instead of CMYK Black for text or graphics), this job is better done by professionals. – user2846289 Feb 20 '15 at 19:16
  • @VadimR thanks, putting `.icc` file in the same folder of the target pdf made GS work, but it seems to be not the best approach as you have pointed. There is no support for X-1 only X-3 (most recent). I am considering now compiling the whole dissertation with pdflatex instead of xelatex just to make a bugyy package `pdfx` do the job, ie. make it `PDF/X-1a:2001` compliant. I don't know. – doctorate Feb 20 '15 at 19:38
  • As this looks like an one-time task to me, you might consider getting Adobe Acrobat XI, and use up the trial month. In Acrobat, converting to PDF-X1a is a built-in part of the Preflight tools. Or, you could set a Distiller setting which creates PDF-X1a when processing the PS file. And to make things even better, ask the printshop which ICC profile they prefer (ISO Coated v2 300 is a standard offset press profile, but it it is done on a digital print machine, they may have their own profile, or you could use ISO Coated v2 330). – Max Wyss Feb 21 '15 at 17:21
  • @MaxWyss if it so, I wonder why don't these super-rich print-houses do it by themselves for the poor customers and save them all that guilt feeling of not doing it in CYMK from the beginning? even better sell this service and we accept it gladly. – doctorate Feb 21 '15 at 17:38
  • If you ask and pay for such a service, they do. – Max Wyss Feb 22 '15 at 00:07

1 Answers1

3

You can produce PDF/X files, but not PDF/X1 As I recall PDF/X-1 requires all colours to be specified in CMYK or Gray and older versions of pdfwrite couldn't do that, the current version can, but needs some other work to make it compatible with PDF/X-1, I'm not certain its worth the effort.

See this bug report

KenS
  • 30,202
  • 3
  • 34
  • 51
  • Is this PDF/X actually PDF/X-3? I read from the Ghostscript documentation http://ghostscript.com/doc/current/Ps2pdf.htm#PDFX and have got this thought (sorry I am quite new to these terms). And, can the latest Ghostscript convert PDF to PDF/X-4? – LaBird Mar 17 '15 at 07:57
  • 1
    Yes its PDF/X-3, no we don't currently support PDF/X-4 production. As far as I recall there isn't anything wildly exciting about PDF/X-4 anyway, it should be easy to sort it out. The main thing about PDF/X is enforcing the restrictions anyway. – KenS Mar 17 '15 at 08:18