-1

I am looking for an (open-sourced, or at least free) solution to tune the color of a pdf (or equivalently, ps) file, to black-and-white. Here are some technical specifications.

  1. It should NOT be gray scale. It must contain at most two colors: black and white.
  2. It handles a long pdf file in reasonable time (say, a file with 30 pages, in one or two minutes). This requires the process to be automated.
  3. No significant resolution loss. Converting a pdf file to png/jpeg, thresholding the color and converting it back is a possible way, but as long as one requires 400+dpi resolution for a 30-page document, this way is too slow.

I appreciate it even if one lists some hints. I have tried pdftk a.pdf output b.pdf uncompress to uncompress the file, changing all the color definitions to be 0 0 0 1 k or 0 g or 0 0 1 rg, but when I print the files out, it is still gray, not black.

  • 1
    Are the documents mainly text, or are there line art and images to be expected? – Max Wyss Apr 10 '14 at 10:47
  • Mainly text, plus a small amount of possible vector pictures (typically, journal paper). Thank you. –  Apr 10 '14 at 19:58

1 Answers1

0

In Linux you can use

convert -density 150 -threshold 50% input.pdf output.pdf

But careful with the final quality, it will convert all text to images

I hope it works for you

Salvi Pascual
  • 1,788
  • 17
  • 22