I had some tiffs that I could open up in GIMP and save a layer at a time into a new jpeg. I really didn’t care for that method because I had a lot of pages and I would rather convert them to something like PDF anyway.
I tried converting the multi-layer TIFF to pdf using imagemagick:
# convert CONSUMABLEINVENTORY.tif Consumable.pdf
But it outputted:
Fax3Decode1D: Warning, CONSUMABLEINVENTORY.tif: Premature EOF at line 27 of strip 24 (x 0). Fax3Decode1D: Warning, CONSUMABLEINVENTORY.tif: Premature EOL at line 27 of strip 24 (got 0, expected 2338). Fax3Decode1D: Warning, CONSUMABLEINVENTORY.tif: Premature EOL at line 27 of strip 25 (got 0, expected 2338).
Weird. The resultant PDF had mostly blacked-out pages.
After some research I realized tiifcp could handle it. (a part of the tiff package. eg: emerge -av tiff on Gentoo )
# tiffcp -i CONSUMABLEINVENTORY.tif CONSUMABLEINVENTORY-new.tif # convert CONSUMABLEINVENTORY-new.tif Consumable.pdf
And awesomeness ensued. Or at least a clean PDF file.
tiffcp can clean tiffs with weird null EOL’s.
Moderator on imagemagick explaining that libtiff might be encountering errors that other programs cope with (by ignoring errors).