Forrest logo
back to the img2pdf tool

img2pdf:tldr:fd988

img2pdf: Shrink only larger images to a 10cm by 15cm rectangle inside a 30x20cm page.
$ img2pdf ${filename-tiff} --pagesize ${30cm}x${20cm} --imgsize ${10cm}x${15cm} --fit ${shrink} --output ${filename-pdf}
try on your machine

This command is using the "img2pdf" tool to convert an image file in TIFF format into a PDF file. Here is a breakdown of each part of the command:

  • ${filename-tiff}: This is a variable representing the name of the input TIFF file.
  • --pagesize ${30cm}x${20cm}: This option sets the page size of the output PDF file to be 30 centimeters wide and 20 centimeters tall.
  • --imgsize ${10cm}x${15cm}: This option sets the size of the image within the PDF to be 10 centimeters wide and 15 centimeters tall.
  • --fit ${shrink}: This option tells the tool to shrink the image if necessary to fit it within the specified image size.
  • --output ${filename-pdf}: This option sets the name of the output PDF file to be created.

Overall, this command takes a TIFF image file, sets the page size and image size for the PDF, adjusts the image size if needed, and saves the result as a PDF file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the img2pdf tool