When you add a watermark to a PDF file, you may want to set the font height of the watermark too before you print the PDF file. Under such a circumstance, I would like you to use VeryPDF PDFPrint Command Line, which is a very useful professional PDF software application, which can print PDF files without Adobe reader or other Adobe products in your computer. Via command line, you can effectively and quickly add watermark of proper font height to the PDF file you want to print.
The following part of this article will introduce the important command -wh <int>, which is used to set the font height of watermark, and show how to set watermark font height and print PDF via command line. Normally, you need to take three steps as follows:
Step 1: Run the command prompt window
Four steps are required to run the command prompt window: click “Start” > “Run” > enter cmd in the “Run” dialog box that pops out; > press “OK” to close the “Run” dialog box and you will see the black and white command prompt window. The following illustrates the steps to open the command prompt window.
Step 2: Type a command line
The command line you are going to print should contain four parts. You can refer to the following pattern:
pdfprint.exe -wtext <string> -wh <int> <PDF Files>
The command line pattern consists of four parts:
- pdfprint.exe is the executable file of VeryPDF PDFPrint Command Line.
- -wtext <string> can be used to add watermarks on PDF files. The angle brackets <> mark the essential content and string refers to character string. Hence, if you want to add a watermark to PDF, you should mark the content of the watermark by the quotes “”.
- -wh <int> is the command that can be used to set the font height of the watermark. int stands for integer, and again, the pair of angle brackets mark the essential part.
- <PDF Files> refers to the selected PDF file, on which you want to add a watermark.
As a matter of fact, when you enter a command line in the command prompt window, you seldom enter the bare name of the executable file, neither the bare name of the PDF file you want the print. Instead, the directory of the executable file, and the directory of the selected PDF file should appear in the command line. Otherwise, the computer cannot recognize them. To make it easier for you to understand, let’s take the following command line as an example.
D:\pdfprint_cmd\pdfprint.exe -wtext “watermark” -wh 100 D:\top.pdf
- D:\pdfprint_cmd\pdfprint.exe is the directory of the executable file. It indicates that the executable file which is called pdfprint.exe is placed in the folder named pdfprint_cmd on disk D. If you don’t enter the full directory but just the bare name of the executable file, you will find the message underlined in the command prompt window as illustrated below:
Hence, you should enter the exact directory of the executable file, depending where is placed in your computer.
- -wtext “watermark” indicates that the text watermark should be added to the PDF file. You can use the quotes to mark whatever text you like to add to the PDF file as a watermark. Like “Hello” and “verypdf”.
- -wh 100 is the command that can be used to set the font height of the watermark. 100 is the font height of the watermark.
- D:\top.pdf is the directory of the selected PDF file in my computer. And yes, it can be replaced by the directory of the selected PDF file on your own computer.
Step 3: Press the “Enter” key
After you press “Enter” on the keyboard, the computer will start working. And you can view the press in the command prompt window as illustrated below:
The following is the comparison between the default watermark font height and the watermark font height 100
default watermark font watermark font height 100