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?