If you take pictures of your lectures in school, this is an easy way to put them together into a single document that will contain all the pictures sorted by name. This works for any Linux distribution, only the way you install the programs may change.

First, you will need to install two applications:

sudo apt-get install ImageMagic pdfmod

Now go into the folder where you have your pictures – you should have nothing but pictures! – then run the following command:

convert -quality 90 * pictures.pdf 

Sometimes the resulting pdf document has pictures with the wrong orientation, you can fix that by running:

pdfmod pictures.pdf

Of course save the document after making the changes.