如何重新导入CMYK PDF到Adobe (Illustrator/ photoshop等)后负解码[0 1]



我有一个由InDesign创建的pdf,我想在postscript中重新创建。

下面的脚本按照预期使用负解码数组创建我的(简单)pdf。在pdf阅读器中看起来很棒(如预期的那样),然而,当我在Illustrator或其他Adobe产品中重新打开它时,JPG变成了负数。

  << /PageSize [419.528 595.276] >> setpagedevice 
    % [ W x H ] 
    /DeviceCMYK setcolorspace 
    % Page 1 
    %
    % Set the Original to be the top left
    %
    0 595.276 translate 
    1 -1 scale 
    gsave 

    %% Images when flipped to draw correctly are scaled UPWARDS 
%% so you need to move the x,y position to the bottom left
-1.44 621.714330709 translate % Bottom Left Cordinates
% unset the mirror or the image will be flipped!
1 -1 scale 
% scale the image
438.000944882 657.119055118 scale  %%% Need to work out size and width into Units

/Image1File (cmyk_image.jpg) (r) file /DCTDecode filter  def
/Image1
{
<<
  /ImageType 1
  /Width 1825
  /Height 2738
  /ImageMatrix [1825 0 0 -2738 0 2738]
  /BitsPerComponent 8
  /Decode [1 0 1 0 1 0 1 0] % can either be 1 0 or 0 1
  /DataSource Image1File
>>
} bind def
/DeviceCMYK setcolorspace
Image1 image
% Reset to previous X and Y ( line 13 )
grestore 
gsave
showpage 

我知道这是由于Adobe的方式反转其解码值,但我还没有遇到一个实际的解决方案,一个外部库可以创建一个pdf,可以在Adobe的程序中重用。

附件是有关的JPG文件。

cmyk_image

执行上述脚本。ps

gs -o output.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/prepress input.ps

CMYK image and Issue PDF.zip

我完全同意David上面提出的观点,特别是你不能把Illustrator作为一个通用的PDF编辑应用程序。

然而,由于这个是一个编程问题…这是我在上面的评论中修改的代码。它使用过程数据源在读取数据时反转数据。这消除了对"不寻常"解码数组的需要,我认为这意味着它将与Illustrator一起工作(我没有副本,因此无法检查)。
  << /PageSize [419.528 595.276] >> setpagedevice 
    % [ W x H ] 
    /DeviceCMYK setcolorspace 
    % Page 1 
    %
    % Set the Original to be the top left
    %
    0 595.276 translate 
    1 -1 scale 
    gsave 

    %% Images when flipped to draw correctly are scaled UPWARDS 
%% so you need to move the x,y position to the bottom left
-1.44 621.714330709 translate % Bottom Left Cordinates
% unset the mirror or the image will be flipped!
1 -1 scale 
% scale the image
438.000944882 657.119055118 scale  %%% Need to work out size and width into Units

/Image1File (d:/temp/cmyk_image.jpg) (r) file /DCTDecode filter  def
/Image1
{
<<
  /ImageType 1
  /Width 1825
  /Height 2738
  /ImageMatrix [1825 0 0 -2738 0 2738]
  /BitsPerComponent 8
  /ColorTransform 1
%  /Decode [1 0 1 0 1 0 1 0] % can either be 1 0 or 0 1
  /Decode [0 1 0 1 0 1 0 1] % can either be 1 0 or 0 1
%  /DataSource Image1File
  /DataSource {
Image1File 1825 string readstring pop
0 1 1824 {
1 index exch
dup 2 index exch get 255 exch sub put
} for
}
>>
} bind def
/DeviceCMYK setcolorspace
Image1 image
% Reset to previous X and Y ( line 13 )
grestore 
gsave
showpage 

对你的问题很难给出确切的答案,但我还是要试一试。简而言之,我建议将此记录为Adobe Illustrator的错误,这是对您的问题的唯一可能的答案。

我打开了你的PDF文件,它看起来绝对完美,没有任何问题。Apple Preview, Adobe Acrobat DC, Adobe Photoshop CC 2014都可以正确打开并正确显示图像。我发现唯一一个行为不正确的应用程序是Adobe Illustrator(我测试了最新的CC 2014版本,所以我们可以假设它是所有版本的Illustrator)。

事实上,你甚至可以争论这是否是Illustrator中的一个bug,或者只是不支持的东西。Illustrator——与流行的看法相反——不是一个PDF编辑器,它也不支持PDF规范的完整性。Illustrator使用的文件格式也不是PDF;它充其量只是PDF的一个子集,说实话,Illustrator玩了一个非常肮脏的把戏来确保往返,并确保它总是能够使用它导出的PDF文件。

:

  • 我不相信你所说的"或其他Adobe应用程序"是真的或仍然是真的(这完全有可能是旧版本的Photoshop例如有同样的问题)。
  • 我不相信你的PDF文件有什么问题;Illustrator有问题(你相信你可以使用Illustrator打开任何随机的PDF文件而不会退化:-))。

最新更新