pdf to grayscale looks awful
Posted: 2009-09-20T03:36:16-07:00
Hello, I possess a ~200MB/350pages pdf file. It is a result from a scan, so every page is an image.
Unfortunately the guy who created this file saved every page in RGB though only 10 pages should be RGB, the rest is fine with grayscale.
I extracted every page from the original pdf into single pdf files to be able to convert all pages into grayscale and create a new pdf from that afterwards.
My first try was the following command (using bash):
This works, but the resulting pages are practically unreadable, it looks like many information gets lost this way.
So for comparison I opened one page with gimp, converted it to grayscale and saved it. The resulting page looks really nice, exactly like the RGB file (but in grayscale of course) and it is about 1MB smaller.
What gimp produces is exactly what I want (though I can only save as png which forces me to convert the file later again), but of course I cannot do this manually for every page, so imagemagick is the only choice I have...
How can I do that with imagemagick?
Unfortunately the guy who created this file saved every page in RGB though only 10 pages should be RGB, the rest is fine with grayscale.
I extracted every page from the original pdf into single pdf files to be able to convert all pages into grayscale and create a new pdf from that afterwards.
My first try was the following command (using bash):
Code: Select all
for FILE in *pdf
convert -type Grayscale $FILE `echo $FILE|cut -f1 -d'.'`_gray.pdf
done
So for comparison I opened one page with gimp, converted it to grayscale and saved it. The resulting page looks really nice, exactly like the RGB file (but in grayscale of course) and it is about 1MB smaller.
What gimp produces is exactly what I want (though I can only save as png which forces me to convert the file later again), but of course I cannot do this manually for every page, so imagemagick is the only choice I have...
How can I do that with imagemagick?