I’m often printing stuff for my kids, like old soviet “diafilms”. They turn into very nice colorful books where you have a lot of image and little text. Something suited for very small ones. It is quite straightforward to do this in Windows: just select images in Explorer and click Print. No linux file manager has this option out of the box, nor there exists an application that can easily allow you to print a book of images.
So I have to package all my JPG’s into a PDF and then you can print it from almost any viewer. Here’s my “application” for doing this (I put it to a local ~/bin/makebook):
#!/bin/bash
for i in *.jpg; do img2pdf ${i} > ${i}.pdf; done
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=book.pdf *.jpg.pdf
rm *.jpg.pdfso, the first line is converting all my JPG’s to individual PDF’s without losing quality. Unfortunately the img2pdf cannot merge multiple PDF’s. The second line “prints” all these files using a virtual printer. The result is a nice book.pdf full of pictures.
First published on the old anydoby.com blog on 2019-05-01.