将RGB转换为PDF中的CMYK的脚本(或其他方法)? [英] Script (or some other means) to convert RGB to CMYK in PDF?

查看:239
本文介绍了将RGB转换为PDF中的CMYK的脚本(或其他方法)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以为Adobe Illustrator或其他工具编写脚本,以读取大量PDF文件的内容并将所有RGB颜色转换为CMYK?

Is it possible to write a script for Adobe Illustrator or some other tool that will read the contents of a number of PDF files and convert all the RGB colours to CMYK?

如果是这样,有人可以指出其中涉及的一些步骤,或者在哪里找到更多相关信息?

If so, could somebody please point out some of the steps involved, or where to find more information on this?

推荐答案

此答案不适用于Illustrator,但适用于其他一些工具" ,即

This answer is not for Illustrator, but for 'some other tool', namely Ghostscript (download gs871w32.exe or gs871w64.exe).

Ghostscript允许您重新提取" PDF( 没有 是对PostScript的中间转换,这是可怕的重新引用"绕道).尝试以下命令:

Ghostscript allows you to 're-distill' PDFs (without an intermediate conversion to PostScript, the dreaded 'refrying' detour). Try this command:

gswin32c.exe ^
    -o c:/path/to/output-cmyk.pdf ^
    -sDEVICE=pdfwrite ^
    -dUseCIEColor ^
    -sProcessColorModel=DeviceCMYK ^
    -sColorConversionStrategy=CMYK ^
    -sColorConversionStrategyForImages=CMYK ^
     input-rgb.pdf

如果您可以再等待几周,Ghostscript 9.00将被发布.这个新版本将首次通过ICC配置文件支持颜色管理(基于LCMS)...

And if you are able to wait for a few more weeks, Ghostscript 9.00 will be released. This new version will sport support of colormanagement (based on LCMS) with ICC profiles for the first time ever...

更新:我更新了上面的命令,因为我错过了同时转换图像的选项.

UPDATE: I updated above command because I missed to put in the option to also convert images.

如果颜色转换无法正常工作,并且您看到诸如无法将颜色空间转换为灰色,将策略恢复为LeaveColorUnchanged"之类的消息,则然后...

If color conversion does not work as desired and if you see a message like "Unable to convert color space to Gray, reverting strategy to LeaveColorUnchanged" then...

  1. 您的Ghostscript可能是 9.x版本系列的较新版本,并且
  2. 您的源PDF可能使用嵌入式的 ICC颜色配置文件
  1. your Ghostscript probably is a newer release from the 9.x version series, and
  2. your source PDF likely uses an embedded ICC color profile

在这种情况下,将 -dOverrideICC 添加到命令行,然后查看其是否会根据需要更改结果.

In this case add -dOverrideICC to the command line and see if it changes the result as desired.

这篇关于将RGB转换为PDF中的CMYK的脚本(或其他方法)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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