Convert rgb pdf file to cmyk

First we need imagemagick. Install it using following command:

$sudo apt-get install imagemagick

Following commands convert the rgb pdf file  to cmyk

1. Check whether the test.pdf is rgb or cmyk

$ identify -verbose ‘test.pdf’

It displayes the many properties. Check colorspace: rgb /cmyk

If it displayes cmyk, then its ok. Otherwise need to convert into cmyk

2. To convert rbg to cmyk use following command:

$ gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK -sOutputFile=output.pdf input.pdf

It displays the following output:

Replace the input.pdf with your test pdf file

3. Now again check the properties of pdf file by following command:

$ identify -verbose 'test.pdf'

It displays the following output:

Advertisements

4 thoughts on “Convert rgb pdf file to cmyk

  1. Great work! Thanks.
    I tried the conversion and black RBG (0, 0, 0) was transformed into black CMYK(100, 100, 100, 0). Black CMYK preferable for some printers is CMYK(0, 0, 0, 100). Is it posible to accomplish? Is there a way to set the icc transformation file to ghost script using command line argument?
    Thanks,
    Dejan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s