Group4 Compression not Working with PDF
Posted: 2014-04-27T15:28:57-07:00
I am trying to compress some PDF files with Group4 compression. This command works:
convert -density 300 -threshold 90% -compress group4 input.pdf tif:- | convert - -compress group4 output.pdf
But these do not:
convert -density 300 -threshold 90% -monochorme -compress group4 input.pdf output.pdf
convert input.pdf -density 300 -threshold 90% -monochorme -compress group4 output.pdf
convert -density 300 -threshold 90% -compress group4 input.pdf output.pdf
The input is a color PDF scan. 2 errors occur. First, in first and second command above, the monochorme filter is processed before the threshold filter. Second, in all of the above commands the resulting PDF does not have group4 compression. I am not sure what's going on. Those commands worked just fine on an older copy of IM on windows. However, with the latest copy of IM I have to first convert the color PDF into a multipage TIF file and then convert that into PDF, which basically doubles the processing time.
Any idea how to fix this? I think it might be a bug, as it works fine with older copy of IM I have on my windows machine. I tested this on OSX and Linux.
- Bogdan
convert -density 300 -threshold 90% -compress group4 input.pdf tif:- | convert - -compress group4 output.pdf
But these do not:
convert -density 300 -threshold 90% -monochorme -compress group4 input.pdf output.pdf
convert input.pdf -density 300 -threshold 90% -monochorme -compress group4 output.pdf
convert -density 300 -threshold 90% -compress group4 input.pdf output.pdf
The input is a color PDF scan. 2 errors occur. First, in first and second command above, the monochorme filter is processed before the threshold filter. Second, in all of the above commands the resulting PDF does not have group4 compression. I am not sure what's going on. Those commands worked just fine on an older copy of IM on windows. However, with the latest copy of IM I have to first convert the color PDF into a multipage TIF file and then convert that into PDF, which basically doubles the processing time.
Any idea how to fix this? I think it might be a bug, as it works fine with older copy of IM I have on my windows machine. I tested this on OSX and Linux.
- Bogdan