pdfutils
clone your own copy | download snapshot

About

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

Dependencies:

  • gs (Ghostscript)
  • pdftops

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

Usage:

./rgb2cmyk.sh input.pdf

Overprint

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

Dependencies:

  • 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.

Example

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

Dependencies:

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.

Usage:

./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

Log

 

Stéphanie Vilayphiougave away

— 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 Vilayphiousaid

— forgot to rename the file in appending the footer

Monday, 29th September 2014 - 00:18

 

Stéphanie Vilayphiouexposed

— 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 Vilayphioutold

— 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 Vilayphiouconfessed

— some screenshots

Monday, 29th September 2014 - 01:44

 

Stéphanie Vilayphiouspilled the beans

— renamed readme

Monday, 29th September 2014 - 01:48

 

Stéphanie Vilayphioucomplained

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

Monday, 29th September 2014 - 10:04

 

Stéphanie Vilayphiouconfessed

— Images in the read me.

Monday, 29th September 2014 - 10:07

 

Stéphanie Vilayphiousaid

— 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 Vilayphioubrought out

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

Monday, 29th September 2014 - 13:32

 

Stéphanie Vilayphioutweeted

— Typo in the markdown

Monday, 29th September 2014 - 14:07

 

docteurememited

— added color_convert.sh

Wednesday, 1st April 2015 - 12:32

 

docteurembabbled out

— remove temp readme file

Wednesday, 1st April 2015 - 12:41

 

Stéphanie Vilayphiouadmitted

— Merge pull request #1 from docteurem/master

ça merge ou quoi?

Thursday, 2nd April 2015 - 16:38

 

Stéphanie Vilayphiouexpressed

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

Thursday, 25th February 2016 - 13:02

 

Stéphanie Vilayphiougave away

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

Friday, 6th May 2016 - 11:00

 

Stéphanie Vilayphioulet out

— added usage for overprint export

Wednesday, 20th July 2016 - 14:43

 

Stéphanie Vilayphiousaid

— 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

 

alexandresaid

— Update README.md

Friday, 13th March 2020 - 09:43

 

alexandrediscovered

— Update README.md

Friday, 13th March 2020 - 11:36

 

alexandrelet the cat out of the bag

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

Friday, 13th March 2020 - 11:37

 

Ali Raysaid

— 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

 

alexandrelet loose

— Update README.md

Friday, 13th March 2020 - 11:54

 

Ali Raybabbled

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

Friday, 13th March 2020 - 12:20