使用ps2pdf创建正确的PDF/X(GhostScript) [英] Creating correct PDF/X with ps2pdf (ghostscript)

查看:691
本文介绍了使用ps2pdf创建正确的PDF/X(GhostScript)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为此苦苦挣扎了几天,所以我想在这里寻求帮助...

I have been struggling with this for a few days, so I thought I'd ask for help here...

基本上,我正在尝试使用ps2pdf(版本9.10)创建正确的PDF/X-1和PDF/X-3文档.是的,我知道ps2pdf仅支持PDF/X-3(请参阅此线程

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

我注意到,我正在创建的PDF/X-3文件的颜色转换为CMYK,而不是将它们保留为RGB(PDF/X-3就是这种情况).因此,从技术上讲,文件现在为PDF/X-1:我可以通过在PDFX_def.ps中添加"/GTS_PDFXVersion(PDF/X-1a:2003)"并通过Adobe的Preflight运行文件来确认.

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.

这使我进入问题的第一部分:如何防止将原始PDF文档中定义的RGB颜色转换为CMYK?开关"-dColorConversionStrategy =/LeaveColorUnchanged"似乎没有任何作用. (实际上,我在此处读到,这种转换甚至是不可能的.那么,为什么会发生这种情况呢?还是这些过时的信息?)

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?)

其次,为什么文档在与"-dPDFX"结合使用?这不是PDF/X-3的全部内容吗?

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?

第三,是否还可以创建通过Adobe预检的PDF/X-4文档?

Thirdly, is it possible to also create PDF/X-4 documents that pass Adobe's preflight?

顺便说一下,这是我的PDFX_def.ps文件:

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

提前谢谢!

推荐答案

好的,首先,目前不能使用pdfwrite来生产PDF/X-1,因为受PDF支持的颜色限制/X-1.实际上,现在几乎可以做到,但Separation和DeviceN颜色空间不会转换为设备空间,而是必须转换为设备空间.

OK first off you can't produce PDF/X-1 using pdfwrite currently, because of limitations with the colour support in PDF/X-1. It is actually almost possible to do now, but Separation and DeviceN colour spaces are not converted to device spaces, and need to be.

第二,您应该真正使用最新版本的Ghostscript(9.16).

Secondly, you should really use the current version of Ghostscript (9.16).

正如您稍后在回答中指出的那样,文档指出您不能使用/RGB.因此,将RGB颜色转换为CMYK的原因是因为您无法使用RGB(请参阅下文).

As you noted yourself later in your answer, the documentation states that you can't use /RGB. So the reason your RGB colours are converted to CMYK is because you can't use RGB (see later).

您引用的Ghostscript错误报告已有5年历史了,而5年前的真实情况已不再是真实的(并且近2年前发布9.10时也是如此).但是,正如我上面提到的,您仍然无法生成PDF/X-1,这就是该bug仍然打开的原因.已经完成了一些工作,还有更多工作要做.

The Ghostscript bug report you reference is 5 years old, what was true 5 years ago isn't true any longer (and wasn't true when 9.10 was released nearly 2 years ago). However as I Noted above you still can't produce PDF/X-1, which is why the bug is still open. Some work has been done, more remains to do.

与PDFX一起设置ColorConversionStrategy无效,因为PDFX的颜色转换要求从命令行取代了ColorConversion.

Setting ColorConversionStrategy in conjunction with PDFX has no effect, because the colour conversion requirements of PDFX supercede the ColorConversion from the command line.

除非指定DefautlRGB颜色空间本身不是DeviceRGB或DeviceN空间,否则您不能在PDF/X-1文档中使用DeviceRGB空间.我记得在pdfwrite中目前没有提供用于指定DefaultRGB空间的规定,这就是为什么您不能使用DeviceRGB的原因.

You can't use DeviceRGB space in a PDF/X-1 document unless you specify a DefautlRGB colour space which is not itself a DeviceRGB or DeviceN space. As I recall there is currently no provision in pdfwrite for specifying a DefaultRGB space, which is why you can't use DeviceRGB.

最后;不,您还不能使用pdfwrite设备生成PDF/X-4文件.

Finally; no you can't yet produce PDF/X-4 file using the pdfwrite device.

这篇关于使用ps2pdf创建正确的PDF/X(GhostScript)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆