Using Imagemagick to convert TIFF to PDF
How can I convert JPG into PDF easily? shows how to use homebrew
to install imagemagick
and then convert .jpg files into .pdf. I would like to convert many TIFF files to PDF, keeping the same name and changing only the extension.
For JPEG files, the advice was to use the following command:
brew install imagemagick
convert *.jpg output.pdf
I am trying to use the Step 2 command for *.TIFF files into *.PDF.
However, despite using the command line to the letter, I am unable to change my 300 files with this single line. In fact, no file is converted at all.
Would anyone be so kind to provide a helping hand ?
The *
in convert *.jpg output.pdf
expands to the list of inputs. This means the command you were actually running looked like:
convert one.jpg two.jpg three.jpg output.pdf
As you can see from this, that's not what you want, since all the images will be compiled into the output PDF. Also, as the command contains ‘jpg’, it looks for ‘jpg’ files, not ‘tiff’, so you need to change this too.
Therefore, you need to run that command for each of the inputs.
find /path/to/folder -iname "*.tiff" -exec convert {} {}.pdf \;