Bug in convert related to compression fax and group4
Posted: 2016-10-04T02:45:36-07:00
Hi,
I wrote a bash script to manage scans in my workflow. This scripts scans the documents from an ADF-scanner and creates a single PDF out of it. Recently, all pages I scan turn out to be white in the PDF, albeit and strangely, I can see a preview image (thumbnail).
I digged into this problem and figured out that this happens during the convert process. The scan itself is ok, the tif files are good
e.g.
works as desired.
However,
ends up in a pdf that has the right amount of pages but all pages are white. I tried different PDF readers with different backends but none seem to work.
The same happens for -compress Group4.
However,
works ok.
The compression by 'fax' tends out to produce much smaller pdfs then any other compression method. Since I only need the scans for archiving, I prefer as small files as possible.
It worked out well for many years now.
Thus, I wonder maybe some recent changes broke the old behaviour?!
I wrote a bash script to manage scans in my workflow. This scripts scans the documents from an ADF-scanner and creates a single PDF out of it. Recently, all pages I scan turn out to be white in the PDF, albeit and strangely, I can see a preview image (thumbnail).
I digged into this problem and figured out that this happens during the convert process. The scan itself is ok, the tif files are good
e.g.
Code: Select all
scanimage --ald="yes" --page-height=297 -y 297 --contrast=50 --mode=lineart --resolution=200 --batch=out%04d.tif --format=tiff --source="ADF Front"
However,
Code: Select all
convert *.tif -compress Fax test_temp.pdf
The same happens for -compress Group4.
However,
Code: Select all
convert *.tif -compress zip test_temp.pdf
The compression by 'fax' tends out to produce much smaller pdfs then any other compression method. Since I only need the scans for archiving, I prefer as small files as possible.
It worked out well for many years now.
Thus, I wonder maybe some recent changes broke the old behaviour?!