- Install batcher Gimp plugin by copying its extracted folder to
~/.config/GIMP/3.0/plug-ins
. - Multiple images can be easily resized from its gui in gimp.
- Gimp not used because the pdf produced is too large on the disk.
convert
(from imagemagick) andimg2pdf
without the--imgsize
option, produce pages of different sizes in the same pdf document.- Without sorting by number, wildcards would sort files in an alphabetical order.
$ sudo pacman -Sy img2pdf
$ img2pdf -o file.pdf --imgsize 72dpi $(ls -1 *.jpg | sort -n | tr '\n' ' ')
$ pdfimages -png file.pdf image
Without the density option, its default value (72 dpi) resulted in lower quality images:
$ convert -density 300 document.pdf -resize image.jpg
$ pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf