Toas you convert RTF to PDF, you can set passwords, key length and encryption option parameter value in the command line to prevent the PDF file being copied, modified, edited, printed, and read by those who do not have passwords. You can also by setting properties such as PDF author and producer via command line. This article will show you how to protect PDF by setting owner password to forbidden unauthorized users to print your PDF file.
1. Download VeryPDF HTML Converter Command Line
Just click the link of VeryPDF HTML Converter Command Line, you can download it quickly. It will require a couple of seconds to install it on your computer. After it is installed, you can try it free for 50 times. Then, please proceed to the next step.
2. Open the command prompt window
In Windows XP, you can open the command prompt window as follows: click Start, >click Run, > type “cmd”, >and click OK to open the command prompt window.
3. Type a command line
Type a command line, according to the following basic usage: htmltools [options] <RTF file> [<PDF file>]. And the options listed below are useful for setting owner password and protecting PDF from being printed.
- -ownerpwd <string> : Set 'owner password' to PDF file
- -keylen <int> : Key length (40 or 128 bit)
- -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher)
- -keylen 2: 128 bit RC4 encryption (Acrobat 6 or higher)
- -keylen 0: 40 bit RC4 encryption (Acrobat 3 or higher)
- -encryption <int> : Restrictions
- -encryption 3900: Deny anything
- -encryption 4: Deny printing
- -encryption 2048: Disable high res. Printing
For example, when you type a command line as the following one, you will generate an owner password protected PDF file from an RTF file, and nobody can print this PDF file unless he has the owner password.
d:\htmltools\htmltools.exe -ownerpwd "river" -keylen 2 –encryption 4 c:\in.rtf d:\out.pdf
- d:\htmltools\htmltools.exe—the directory of the executable file
- -ownerpwd "river" —specify river as the owner password.
- -keylen 2—set the key length to be 128 bit RC4 encryption
- –encryptions 4— deny printing
- c:\in.rtf—the directory of the input file
- d:\out.pdf—the directory of the output file
If you want to see more options for PDF protecting, you can enter the directory of the executable file of VeryPDF HTML Converter Command Line in the command prompt window. After you type a right command line and press Enter, you will see “result=OK” in the command prompt window in a couple of seconds. Then you can check the result of conversion from RTF to PDF and password setting.
If you want to buy or get more information about VeryPDF HTML Converter Command Line, please click Purchase to visit the product site of this application.