clone your own copy | download snapshot


A repo for small PDF utilities.

Convert PDF RGB to only-Black

This will convert an RGB PDF (even if it appears only black) to input-K.pdf.

./color_convert.sh black input.pdf input-K.pdf

Convert PDF from RGB to CMYK


  • gs (Ghostscript)
  • pdftops

This will convert a PDF to input-cmyk.pdf.


./rgb2cmyk.sh input.pdf


If you need overprint, This command will convert a PDF to input-cmyk-op.pdf :

./rgb2cmyk.sh input.pdf overprint

Combine PDFs having different color modes


  • gs (Ghostscript)
  • pdftk (for multistamp)

This will convert each input PDF file to the corresponding color mode (black, cmyk or spot color), then combine the resulting files on top of each other.


Overlaying a black PDF, a coloured PDF and a spot color PDF (this one is exported full-black and is colored by the script):

./color_convert.sh black,cmyk,spot-PANTONE 705 U-0.9 0.1 0.5 0.1 input_layer1.pdf,input_layer2.pdf,input_layer3.pdf output.pdf

Check color separations


This makes black and white images of each CMYK plates and makes a small HTML page to preview the plates. It will output blank plates if your PDF is in RGB.


./colorSeparation.sh input-cmyk.pdf

Web interface for coloured preview of each plate:

all cyan magenta yellow black

By zooming out, you can see several pages at the same time:

Snapshots | iceberg

Inside this repository



Stéphanie Vilayphioulet loose

— A fresh new repo for small PDF utilities.

./rgb2cmyk.sh input.pdf

This will convert a PDF to input-cmyk.pdf

./colorSeparation.sh input-cmyk.pdf

This makes black and white images of each CMYK plates and makes a small
HTML page to preview the plates.

Sunday, 28th September 2014 - 23:58


Stéphanie Vilayphioubrought out

— forgot to rename the file in appending the footer

Monday, 29th September 2014 - 00:18


Stéphanie Vilayphiouexpressed

— Each plate picture previews its color.

There seems to be a bug with Lazy Load, letting you believe your black
text is in color but it is!

Monday, 29th September 2014 - 00:57


Stéphanie Vilayphioudiscovered

— We get rid of Lazy load which put things not in the right order.
Anyways, we consult the page locally so we don't need it so much.

Some more styling on top of the cake.

Monday, 29th September 2014 - 01:40


Stéphanie Vilayphiouunwrapped

— some screenshots

Monday, 29th September 2014 - 01:44


Stéphanie Vilayphioubrought out

— renamed readme

Monday, 29th September 2014 - 01:48


Stéphanie Vilayphioutalked

— images floating so you can see multipages more easily by zooming out

Monday, 29th September 2014 - 10:04


Stéphanie Vilayphiousaid

— Images in the read me.

Monday, 29th September 2014 - 10:07


Stéphanie Vilayphioushouted

— Add the converted cmyk PDF of example.pdf so that one can test the
colorSeparation.sh directly.

Monday, 29th September 2014 - 10:07


Stéphanie Vilayphioutold

— Oups, all images were the same on the README.

Monday, 29th September 2014 - 13:32


Stéphanie Vilayphiouspilled the beans

— Typo in the markdown

Monday, 29th September 2014 - 14:07



— added color_convert.sh

Wednesday, 1st April 2015 - 12:32



— remove temp readme file

Wednesday, 1st April 2015 - 12:41


Stéphanie Vilayphiouuttered

— Merge pull request #1 from docteurem/master

ça merge ou quoi?

Thursday, 2nd April 2015 - 16:38


Stéphanie Vilayphioubabbled out

— Update rgb2cmyk.sh to preserve true black, with overprint option.

Thursday, 25th February 2016 - 13:02


Stéphanie Vilayphioutold

— The force-black.ps was a symbolic link. Here it is for real.

Friday, 6th May 2016 - 11:00


Stéphanie Vilayphiouadmitted

— added usage for overprint export

Wednesday, 20th July 2016 - 14:43


Stéphanie Vilayphioupeached

— Updated the rgb2cmyk.sh script. Now it converts an RGB PDF into a CMYK
PDF without or with overprint, with no washed colors as we've seen in
Médor 3.
Thanks to Lionel Maes (La Villa Hermosa) to have debugged this together!

Friday, 19th August 2016 - 16:04



— Update README.md

Friday, 13th March 2020 - 09:43


alexandrelet the cat out of the bag

— Update README.md

Friday, 13th March 2020 - 11:36



— Replacing "convert" with "magick" for better compatibility with macos and windows versions of image magick.

Friday, 13th March 2020 - 11:37


Ali Raypublished

— Converting a PDF from RGB to CMYK (overprint or not) now works!

Based on this StackOverflow post: <https://stackoverflow.com/questions/35596346/ghostscript-convert-pdf-into-cmyk-preserving-pure-black-for-text>

Created an ICC profile for images (RGB) and another one for text and
graphics (black) zith the tool collink (from ArgyllCMS)

The new icc profiles are on the repo and how to address them is in the
file `control.txt`.

Friday, 13th March 2020 - 12:18



— Update README.md

Friday, 13th March 2020 - 11:54


Ali Rayspilled the beans

— Merge branch 'master' of gitlab.constantvzw.org:osp/tools.pdfutils

Friday, 13th March 2020 - 12:20