Some of you may need to set PDF password when you convert RTF to PDF. This article will take open password as an example to show you how to convert RTF to PDF and set PDF password via a single VeryPDF HTML Converter Command Line. Just click it and install it on your computer, and follow the steps as follows to Convert RTF to PDF and set PDF password.. But first of all, you need to download
1. Open the command prompt window
As illustrated in the image below, in the XP system, people often open the command prompt window in the following way: click Start, > click Run, > type cmd, > click OK.
2. type a
Before you type a command line, please take a look at the following basic usage of VeryPDF HTML Converter Command Line. This basic usage will show you what should be included in the command line to convert RTF to PDF and set PDF password: htmltools [-openpwd <string>] [ -keylen <int>] <RTF file> [<PDF file>]
In the usage above, the first option -openpwd <string> is used to set password, to be more exactly open password; the second option must co-occur with the first option, and it is used to set key length, which allows three parameters 1.2.and 0.
The following is an example command line, which set password as open, and converts RTF to PDF.
d:\htmltools\htmltools.exe -openpwd "open" -keylen 2 c:\in.rtf d:\out.pdf
- d:\htmltools\htmltools.exe is the directory of the executable file.
- -openpwd "open" can be used to specify open as the open password.
- –keylen 2 sets key length to be 128 bit RC4 encryption(Acrobat 6 or higher). If the number is1, the key length should be -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher).If the number is 0, the key length would be 40 bit RC4 encryption (Acrobat 3 or higher).
- c:\in.rtf is the path of the input file.
- d:\out.pdf is the path of the output file.
Press Enter after you type a proper command line. After conversion, when you double click the icon of the ouput PDF file, you will see the following dialog box as below. You can type the open password you set before to check the result.
If you want to set owner password, you can change the option -openpwd <string>to -ownerpwd <string>. If you want to buy VeryPDF HTML Converter Command Line or buy get more information of how to use it to set PDF password, encrypt PDF as you convert RTF to PDF or other documents to PDF, please click Purchase.