Good way to reduce number of colors in a PDF file?

Solution 1:

Take a look at GhostScript.

PDFs use color depth, which may somewhat limit you in terms of specifying the exact number of colors you would like to use, however, that doesn't mean you won't be able to reduce the file size.

For -depth Ghostscript uses values of:

1 (black & white), 8 (256 colors) and 24 (true color)

Some possible options to help reduce the file size:

-dPDFSETTINGS=/screen   (screen-view-only quality, 72 dpi images)
-dPDFSETTINGS=/ebook    (low quality, 150 dpi images)
-dPDFSETTINGS=/printer  (high quality, 300 dpi images)
-dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs)
-dPDFSETTINGS=/default  (almost identical to /screen)

→ example script.