简体   繁体   English

Ghostscript当前可以将PDF转换为PDF / X吗?

[英]Can Ghostscript currently convert a PDF to PDF/X?

The print house requires my dissertation's PDF to be compliant with PDF/X1a:2001. 印刷厂要求我的论文的PDF与PDF / X1a:2001兼容。 The content file was compiled using XeTeX LaTeX and the second PDF is the cover design done with Inkscape 0.48 . 内容文件是使用XeTeX LaTeX编译的,第二个PDF是使用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 . 我在这篇帖子中找到的最接近的答案是: https : //stackoverflow.com/a/3483801/1288722 ,如果我正确理解的话,至少可以使用Ghostscript将PDF转换为PDF / X。

As stated in the answer above, conversion to PDF/X requires a valid ICC profile. 如以上答案所述,转换为PDF / X需要有效的ICC配置文件。 I contacted the printing house and they provided a file of their preferred one which is: ISOcoated_v2_300_eci.icc . 我联系了印刷厂,他们提供了他们喜欢的文件: ISOcoated_v2_300_eci.icc I added the .icc file to same folder of the target pdf files (thanks to VadimR for this remark). 我将.icc文件添加到了目标pdf文件的同一文件夹中(感谢VadimR的支持)。

Ghostscript 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. 我花了一些时间来做220页,但是效果太差了,令人不快。

Contents of the PDFX_def.ps : 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 Windows 7 32位
  • No commercial programs are desired 不需要商业程序

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. 您可以生成PDF / X文件,但不能生成PDF / X1文件。我记得PDF / X-1要求所有颜色均以CMYK或Gray指定,而较早版本的pdfwrite无法做到,当前版本可以,但是需要一些颜色使其与PDF / X-1兼容的其他工作,我不确定它值得付出什么努力。

See this bug report 查看此错误报告

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM