Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have pages of handwritten notes that I decided to scan to a PDF. Somehow, 153 pages of notes turned into a 156.4 MB PDF file.

The notes are scanned in color because I used four different colors: black, red, blue, green. In fact, the only colors I really need for the document are those four (plus white). Is there a way to reduce the number of colors in the PDF file? (e.g. via a Unix command?)

share|improve this question
1  
It might be a better idea to lower the resolution instead of messing with the colors. –  ZippyV May 18 '13 at 22:21

2 Answers 2

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.

share|improve this answer
    
Thanks for your response. I looked at ghostscript.com/doc/current/Use.htm and could not find how to set the depth. (I tried the example script with -depth=1 added and that did not make the output black and white.) –  Alan C May 19 '13 at 1:23

for color texts, djvu is better in compression, try to extract scanned images from pdf and compress in a djvu file with

djvusolo

djvusolo works very well with wine in Linux

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.