How to convert image to PDF and watermark PDF via command line

If you want to convert image to PDF with watermarks so that you can easily upload, send, print, etc. them, the command line application Image to PDF Converter will be a good assistant for you.

With the help of Image to PDF Converter, you are able to convert various images such as JPG, PNG, BMP, GIF, TIFF, PSD, WMF, EMF, PCX, PIC, etc. to PDF with watermarks. (Watermark is a recognizable pattern or image in paper that is often used as security features of banknotes, passports, postage stamps, etc. to protect copyright and prevent counterfeiting.)

To know how to use this command line application to convert image to PDF and watermark PDF, please do as follows:

At first, please free download the installer of this application via clicking the following button.

download Image to PDF Converter

After the download, please unzip the downloaded ZIP file to a local disk on the computer. In the unzipped folder, there is an executable file named img2pdf.exe which is the called program in the MS-DOS command prompt window

Then, please open the MS-DOS command prompt window so that can input commands. In the opened MS-DOS command prompt window, please follow the command line template shown below to input your commands.

img2pdf [options] <Image-file> [<PDF-file>]


  • img2pdf: call the program
  • [options]: set parameters
  • <Image-file>: specify the input image
  • [<PDF-file>]: specify the output PDF document

In order to add watermarks to the PDF document, please use the options: -wtext <string>.

For example,

img2pdf.exe -wtext "ImagePDF" "C:\in.tif" C:\out.pdf

This example is to convert TIF to PDF and add watermark "ImagePDF" to the converted PDF document.

You can also use the following options to set parameters for the watermark.

-wtype <int> : type of watermark

  • 0 : normal watermark
  • 1 : watermark on header
  • 2 : watermark on footer

-wf <string> : font name of watermark

-wh <int> : font size of watermark

-wb : specify bold font

-wi : specify an italic font

-wu : specify an underlined font

-ws : specify a strikeout font

-wa <int> : angle of watermark

-wc <string> : color of watermark,

  • FF0000: Red color
  • 00FF00: Green color
  • 0000FF: Blue color
  • HexNum: Other colors

-wx <int> : X offset of watermark

-wy <int> : Y offset of watermark

At last, please hit the Enter button on the keyboard to run the commands.

Several seconds later, you can get the watermark PDF document in the location you specify.

This is the end of this article and you can get full version of Image to PDF Converter here.

Related Posts: