Convert documents of RTF to PDF and encrypt PDF by command line

When you convert rtf to pdf document, you may not want it to be printed, modified, copied, etc. freely. For better protecting your contents, you can encrypt pdf documents with different commands when you use a command line application such as denying printing, modification, copying, etc. You can also set the password to the output PDF document.

With the command line application of Document Converter, you can do this work easily because the commands you will use are easy to learn and the operations are easy to be accepted. The command line application is powerful enough to convert any printable documents to image formats and it is also able to set different parameters for the target file.

Mentioned about Document Converter, it is a combination of three internal applications. The GUI application is good at batch conversion because it has a friendly and clear interface. The command line is a good assistant to software developers and the virtual printer application can be used to save paper and ink or as a powerful document converter.

You should download the command line application at http://www.verypdf.com/artprint/docprint_pro_setup.exe for free trial and install it on your computer. The executable file doc2pdf.exe will be runnable after the installation. Please see the steps about converting rtf to pdf in the following contents.

1. You should open MS-DOS prompt window for inputting the command line. You can use one of the following ways to open MS-DOS prompt window. The first one is to click “Start”—“Run” to open “Run” dialog box and input “cmd” in “Open” combo box and click “OK” button. The other way is to use the hot key “Window”+ “R” to open “Run” dialog box and do the same work in following operations.

2. The command line to be inputted in MS-DOS prompt window is made up of called program, parameter for encrypting pdf document, source file and target file just like the following template:

doc2pdf -s ownerpwd=758 -s keylen=2 -s permission=4 -i C:\test.rtf -o C:\test.pdf

In the command line,

doc2pdf stands for the called program and you should use the full path of it when you input the command line.

-s ownerpwd=758 is for setting the owner password as “758”. You cans also set the open password for output PDF document with the command –s openpwd.

-s keylen=2 is for setting key length as 128 bit RC4 encryption. The number can also be changes as “0” or “1”.

-s permission=4 is for encrypting PDF document as not being printed.

Other commands for the encryption are as follows:

-s permission=0    : Encrypt the file only
-s permission=3900 : Deny anything

-s permission=8    : Deny modification of contents
-s permission=16   : Deny copying of contents
-s permission=32   : No commenting

-i C:\test.rtf specifies the path of source file.

-o C:\test.pdf is the name of the target file.

When finishing in inputting the command line, you need to click “Enter” button to run the conversion from rtf to pdf and several seconds later, you will get the target file in the location you have just set.

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!