I have a large collection of documents in various formats (PDF, TIFF, JPEG).
Many of the TIFFs are multi-page, like faxes, and the only way I know to see all the pages is with Preview.
Is there some method or app or shell command (via brew
) which can find all the multi-page TIFFs so that I can convert them to multi-page PDFs?
Best Answer
There is a way to find them using a command line in the terminal. This requires you to install a tool which is not part of the default command set.
Download and install exiftool.
exiftool is able to print detailed information about image files, including TIFFs. It can tell the difference between multi-page documents and between FAXes and photographic TIFFs. For example testphoto.tif is a regular TIFF file and testfax.tif is a multi-page FAX:
If we can get the filename and the identifying info on one line, then we can use grep to identify the files we want. The -csv option puts the output on one line in comma seperated value format. So, a command like this would do what you want.
So, we have correctly identified testfax.tif as the only multi-page TIFF in this directory.