Ubuntu – Merging multiple images into one document and add any caption/label to them

image processingimagemagickpdf

I have multiple jpg and png images. I would like to combine them within one document (ODT/PDF/RTF).
It can be easily done by means of following command:

convert *.png allTogether.pdf

However, there will be no labels/captions/file names, so that it will be difficult to for example ensure which image we're displaying now in current PDF page.

Is there any ready solution to merge images to one PDF and attach any metadata to them (for example file name)?
I thought about writing a script which will generate LaTeX document, but maybe there're simpler ways.

Best Answer

You already use the right tool e.g.

convert *.png -gravity South -annotate 0 '%f' all.pdf

Here you can find more examples: http://www.imagemagick.org/Usage/annotating/