Skip to content

riedel/pdf2indexedCMYK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pdf2indexedCMYK

Simple conversion of a RGB pdf into an indexed CMYK pdf

  ./pdf2indexedCMYK input.pdf colors.yaml output.pdf

Currently requires PDFtk, ghostscript, pyYAML, numpy

Please open an issue if you find a better way to eg. convert an a color into eg. CMYK(0.6,0,0,0.2).

Works for common PDFs and allows control of output color space (3 dimensions to 4 dimensions). Replaces RGB colors with a CMYK value based on its nearest neighbour in the RGB color space.

Uses a dictionary to translate RGB values in order to allow manually "specify" a simple color profile.

Useful for keeping common CMYK values for printing while having only RGB capable vector graphics tools (like Powerpoint, Inkscape, ...).

NOTES:

  • Does not work with Images
  • The YAML Syntax for the colors is not correct but functional

BUGS/IMPROVEMENTS:

  • Does not yet replace complex lineart correctly (TODO:correct regexp)
  • Break PDF Stream a bit

Copyright Till Riedel 2017, licenced under MIT Licence

About

Conversion of a RGB pdf into an indexed CMYK pdf

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages