I have many screenshots which were all taken under the same conditions: Same display resolution, same display scaling, PDF viewer at the same size, PDF zoom level the same, etc.
They are of different width and height. The widest ones have normal text width of DIN A4 paper (portrait).
I want them to be put into a PDF (paper size: DIN A4, portrait) but not one per page like
convert * output.pdf
would do but with as many as possible per page. Order matters (alphanumerical order of the file names; The files are named {1..n}.png
.). The images shouldn't be stretched out in width to match the text width of the PDF but should instead all have a common (constant) zoom factor.
All the images are in the PNG format.
I prefer a command-line way to achieve this so doing it repeatedly – possibly in an automated way – is easy.
Some kind of separator between the screenshots would be nice, so it's easy to see where one ends and the next one begins.
imagemagick
or variants), but I'm not aware of any ready-made tool that calculates those positions for a given set of images (BTW, this is the bin-packing problem, which is NP-complete). You probably will have to write your own program for that, or do it manually.