Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have many jpeg files in a directory, and I want to convet them to pdf and concatenate them together to make a document. How can it be done? Preferably from the command line as it will be faster.

share|improve this question

5 Answers 5

From the imagemagick package, use the convert command:

convert *.jpg pictures.pdf

You will get a single pdf containing all jpg in the current folder.

Install IM with:

sudo apt-get install imagemagick

source: stackoverflow

share|improve this answer
Wow, this is soooo convenient! –  king_julien Apr 19 at 21:39

Worked for me:

convert page1.jpg page2.jpg +compress file.pdf

or even:

convert -rotate 90 page\*.jpg +compress file.pdf

From ubuntuforums.org, the +compress helps it to not hang as well as presumably making the resulting PDF smaller.

share|improve this answer

I have used http://convert-my-image.com/ The positive thing that you can provide (the same site but different page) an archive of images and concatenate them to the common pdf

share|improve this answer
convert `ls -1v` file.pdf
  • This ls will list one file a time in a "natural order" (1,2,3...) and proceed with conversion.
share|improve this answer

Most of the time I use http://convertjpgpdf.net/ althought im looking for a local program as I dont have internet all the time... Someone got a clue?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.