How to convert multiple images into PDF files using command line (ImageMagick)

Опубликовано: 02 Ноябрь 2024
на канале: Minimalist Life
205
7

Hello everyone. Today I'm gonna show you how to batch convert multiple images into pdf files using a command line tool called ImageMagick. ImageMagick is an open-source software suite that is used to create, edit, and convert raster and vector images. It can be used to manipulate and process a wide variety of image formats. ImageMagick is available for free and can be used on multiple operating systems, including Windows, macOS, and various Linux distributions. Please note that this is a guideline for Windows, it should be similar for other operating systems.


Step 1: Go to ImageMagick.org and download the installer.
Step 2: Execute the downloaded installer.
Step 3: Make sure ImageMagick directory has been added to environment path.
Step 4: Open command line or terminal and check if Magick has been installed successfully.
Step 5: Go to a folder with all your images and executet this command for one-file convert. You can define the output quality if you want to:
magick convert -quality 100 {filename}.jpg {filename}.pdf

Or this command for multiple-files convert:
magick convert -quality 100 *.jpg out-%d.pdf

That's it, to merge these pdf files into one, you can use ImageMagick itself or another tool called PDFSamBasic with a friendly UI. For more information and use cases, please checkout the official document on ImageMagick home page. Thank you for watching the video. I'll see you guys in the next one.