convert can read a file that is a list of file names to be converted in the order they are listed.
So all you need to do is create that list in the order you want.
So, to make the pdf of jpgs sorted by name try
Code:
ls *.[jJ][pP][gG] > filelist
convert @filelist Doc.pdf
Reverse sorted by name
Code:
ls *.[jJ][pP][gG] | sort -r > filelist
convert @filelist Doc.pdf
Sorted by modification time
Code:
ls -t *.[jJ][pP][gG] > filelist
convert @filelist Doc.pdf
I am sure there is a way to get rid of the intermediate step of storing the filenames in filelist by having convert read from STDIN but I can't make it work. If you can, tell me how.
find [options] *.[jJ][pP][gG] | sort [options] > filelist may be something else to play with (Eg find all jpgs created in the last week, sort them by name and convert them).
Have fun.