Create PDF file from (png, jpg, gif ) images / pictures in Linux

Tuesday, 14th September 2010

I’ve recently received a number of images in JPEG format as a feedback on a project plan that was constructed by a team I’m participating at the university where I study.

Somebody from my project group has scanned or taken snapshots of each of the hard copy paper feedback and has sent it to my mail.

I’ve received 13 images so I had to open them one by one to get each of the Project Plan to read the feedback on the page this was really unhandy, so I decided to give it a try on how to generate a common PDF file from all my picture files.

Thanksfully it happened to be very easy and trivial using the good old Image Magick

In order to complete the task of generating one PDF from a number of pictures all I did was.1. Switch to the directory where I have saved all my jpeg images

debian:~# cd /home/hipo/Desktop/my_images_directory/

2. Use the convert binary part of imagemagick package to generate the actual PDF file from the group of images

debian:~# convert *.jpg outputpdffile.pdf

If the images are numbered and contain many scanned pages of course you can always pass by all the images to the /usr/bin/convert binary, like for instance:

debian:~# convert 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg outputpdffile.pdf
Even though in my case I had to convert to PDF from multiple JPEG (JPG) pictures, convertion with convert is not restricted to convert only from JPEG, but you can also convert to PDF by using other graphical file formats.

For instance to convert multiple PNG pictures to a single PDF file the command will be absolutely the same except you change the file extension of the graphic files e.g.:

debian:~# convert 1.PNG 2.PNG 3.PNG 4.PNG 5.PNG OUTPUT-PDF-FILE.PDF

I was quite happy eventually to know Linux is so flexible and such a trivial things are able to be completed in such an easy way.

Share this on:

Download PDFDownload PDF

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

5 Responses to “Create PDF file from (png, jpg, gif ) images / pictures in Linux”

  1. A.M. says:
    Firefox 3.5.3 Firefox 3.5.3 openSUSE x64 openSUSE x64
    Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090909 SUSE/3.5.3-1.2 Firefox/3.5.3

    cpnvert *.jpeg Tome.pdf *is* actually a simple click!

    View CommentView Comment
  2. Darius Ketcheside says:
    Firefox 3.0.14 Firefox 3.0.14 Windows XP Windows XP
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)

    Thanks for posting this article. I’m decidedly frustrated with struggling to search out pertinent and intelligent commentary on this issue. Everybody today goes to the very far extremes to either drive home their viewpoint that either: everyone else in the planet is wrong, or two that everyone but them does not really understand the situation. Many thanks for your concise, pertinent insight.

    View CommentView Comment
  3. Bebopsan says:
    Firefox 21.0 Firefox 21.0 Ubuntu x64 Ubuntu x64
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0

    This is great, it works perfectly. Thank you.

    View CommentView Comment

Leave a Reply

CommentLuv badge