Forrest logo
back to the img2pdf tool

img2pdf:tldr:f4b36

img2pdf: Convert an image to PDF, and specify metadata for the resulting file.
$ img2pdf ${filename-png} --title ${title} --author ${author} --creationdate ${1970-01-31} --keywords ${keyword1 keyword2} --subject ${subject} --output ${filename-pdf}
try on your machine

This command is used to convert an image file (in png format) to a PDF file. Here is the breakdown of the command:

  • img2pdf: This is the name of the command or program that is used to convert the image to PDF.
  • ${filename-png}: This is a variable representing the name of the input image file in png format. You need to replace ${filename-png} with the actual name or path of the image file you want to convert.
  • --title ${title}: This is an optional parameter to set the title of the resulting PDF file. Replace ${title} with the desired title.
  • --author ${author}: This is an optional parameter to specify the author of the PDF file. Replace ${author} with the desired author.
  • --creationdate ${1970-01-31}: This is an optional parameter to set the creation date of the PDF file. Replace ${1970-01-31} with the desired creation date in the format "YYYY-MM-DD".
  • --keywords ${keyword1 keyword2}: This is an optional parameter to add keywords or tags to the resulting PDF file. Replace ${keyword1 keyword2} with one or more desired keywords, separated by a space.
  • --subject ${subject}: This is an optional parameter to set the subject of the PDF file. Replace ${subject} with the desired subject.
  • --output ${filename-pdf}: This is a parameter to specify the output filename or path for the resulting PDF. Replace ${filename-pdf} with the desired name or path for the output PDF file.

Make sure to replace the variables with suitable values and include the actual file names and paths when using this command.

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