Shrink only larger images to a 10cm by 15cm rectangle inside a 30x20cm page

img2pdf

  • Command-line lossless converter of raster images to PDF.
    More information: <https://gitlab.mister-muffin.de/josch/img2pdf>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

img2pdf {{path/to/file.tiff}} --pagesize {{30cm}}x{{20cm}} --imgsize {{10cm}}x{{15cm}} --fit {{shrink}} --output {{path/to/file.pdf}}

click the source code to copy install img2pdf on any operating system with command-not-found.com