How to set the margin and convert RTF to PDF?

If you have multiple files to convert from RTF to PDF, VeryPDF HTML Converter Command Line is one of the best solutions, especially when you also need to set the margin or add watermarks. This article aims to introduce a method to help you take only three steps to set the margin and convert RTF to PDF via command line. But first you should install VeryPDF HTML Converter Command Line in your computer. You can download it by clicking VeryPDF HTML Converter Command Line. After you install it, please follow the steps below to set the margin and convert RTF to PDF yourself.

Step 1: Open the command prompt window

We can begin with opening the command prompt window. It requires four steps: click “Start” in the lower-left corner of the computer screen; > click “Run” on the menu; > When the “Run” dialog box appears, enter “cmd” in it. > Click “OK” and the command prompt window will appear on the screen immediately.

Open the command prompt window

ready to type a command line

Step 2: Type a command line

Type the following four items in order in the command prompt window and leave a space between each other: the directory of the executable file, the command for margin setting, the directory of the input file and the directory of the output file. Maybe you would like to take a look at the following pattern which includes the four items.

htmltools -margin <string> <RTF file> <PDF file>

  • htmltools is the main executable file of VeryPDF HTML Converter Command Line.
  • -margin <string> is the command that can be used to set page margin to PDF file. The angle brackets are used to enclose essential elements. string here refers to character string. The parameter value following –margin can be divided into four types:
    • -margin 10 : Set margin to 10pt to left
    • -margin 10x10 : Set margin to 10pt to left, top
    • -margin 10x10x10 : Set margin to 10pt to left, top, right
    • -margin 10x10x10x10 : Set margin to 10pt to left, top, right, bottom
  • RTF file is the input file.
  • PDF file is the output file.

The following is a good example of command line. It consists of the four items mentioned above, and includes the directories of the files.

D:\htmltools\htmltools.exe -margin 20x20 C:\in\*.rtf D:\out\*.pdf

  • D:\htmltools\htmltools.exe ---- the directory of the executable file. It represents the executable file htmltools.exe located in the folder htmltools on disk D.
  • -margin 20x20 ---- the command that can be used to set margins to 20pt to left and top.
  • C:\in\*.rtf ---- the directory of the input files. The wildcard * represents all the input RTF files in the folder in on disk C. The file extension specifies RTF as the input format.
  • D:\out\*.pdf ---- the directory of output files. Here, the file extension specifies PDF as the output format. It indicates that all the result files should be placed in the folder out on disk D.

If you like, you can replace the directories in the example above with the directories of the files in your computer first, then copy it and paste to the command prompt window.

Step 3: Press “Enter”

Press the key “Enter” to let the computer convert RTF to PDF and leave margins . When you see “result=OK” in the command prompt, it means the computer has converted one of the files.  If you want to buy the full version of VeryPDF HTML Converter Command Line, please click Purchase. If you want to learn more about how to convert RTF to other files, please read related articles at the knowledge base of VeryPDF. If you are interested in other products, please visit the home page of VeryPDF.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!