Multiple TIFFs to separate PDFs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MrMuscle
Posts: 3
Joined: 2017-11-15T03:44:22-07:00
Authentication code: 1152

Multiple TIFFs to separate PDFs

Post by MrMuscle »

Hello! I'm using IM 7.0.7 Q16 on Windows 7. I have few hundred TIFF files which I need to convert to PDF files. Each TIFF file contain one page and I need to create separate PDF file of each with the original filename so that the only thing on the file changes is the filetype. I tried to look solution for this from this forum but was not able to find it. I bet this can be done with IM. Can somebody help me? :)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Multiple TIFFs to separate PDFs

Post by snibgo »

Code: Select all

for %F in (x*.tiff) do magick %F %~nF.pdf
snibgo's IM pages: im.snibgo.com
MrMuscle
Posts: 3
Joined: 2017-11-15T03:44:22-07:00
Authentication code: 1152

Re: Multiple TIFFs to separate PDFs

Post by MrMuscle »

I must say that I'm new to this program so I would need just a little more help to complete this task :( These TIFF files are in separate folders. I have this "main folder" which contains sub folders where these TIFFs are. Example of my folder structure:

Main Folder\Sub Folder 1\image_1.tif
Main Folder\Sub Folder 1\image_2.tif
Main Folder\Sub Folder 2\image_3.tif
Main Folder\Sub Folder 2\image_4.tif
.
.

What is the best way to convert these tiffs to pdf files? I would like to do this as batch so there would be no need to do it one by one. Conversion can be done in the original quality.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Multiple TIFFs to separate PDFs

Post by snibgo »

You can "cd" or "pushd" to each directory in turn.

If you don't know what I mean, I suggest you find a site that explains the basics of Windows commands.
snibgo's IM pages: im.snibgo.com
MrMuscle
Posts: 3
Joined: 2017-11-15T03:44:22-07:00
Authentication code: 1152

Re: Multiple TIFFs to separate PDFs

Post by MrMuscle »

I got help from elsewhere. I installed FindUtils for Windows.

Link: http://gnuwin32.sourceforge.net/packages/findutils.htm

Code: "C:\Program Files (x86)\GnuWin32\bin\find.exe" "C:\Users\XXX\Desktop\Folder" -type f -regex ".*tif" -exec magick "{}" "{}.pdf" ;

This printed out separate pdf of each tif file. Only problem was that the output filename would go with following pattern: Image_1.tif -> Image_1.tif.pdf but thats not really a problem.
Post Reply