When you need to create a PDF document, you may be required to protect the contents of the document, such as not to be printed, modified, and copied or others. So if you want to convert the document ofand encrypt pdf by command line, you can choose the command line application of Document Converter.
Document Converter is an expert in converting any printable documents to various image formats. It has three internal applications—command line application, GUI application and virtual printer application, all of which are designed for meet different needs.
If you want to make conversion in a friendly and easy to understand user interface, please choose the GUI application. If you are a software developer and need to develop software or you love to use MS-DOS interface, please choose the command line application. If you need to print documents and want to save paper, the virtual printer application will be a helper to you.
The command line application will play the leading role in this article and if you want to use it, please download it at http://www.verypdf.com/artprint/docprint_pro_setup.exe for free trial and if you want to use all functions of it, please buy it at http://www.verypdf.com/order_docprintpro.html.
Before converting the document ofand encrypting the document, please open the MS-DOS interface for you need to input command line in it. You can click “Start”—“Run” or use the combination “Window”+ “R” to open “Run” dialog box. Then please type “cmd” in “Open” combo box in “Run” dialog box and click “OK” button.
The command line to be inputted in MS-DOS interface contains called program, parameters for encrypting pdf document, source file and target file like the following example:
doc2pdf -s ownerpwd=456 -s keylen=2 -s permission=3900 -i C:\test.txt -o C:\out.pdf
doc2pdf stands for the called program which is the executable file doc2pdf.exe in installation package of the command line application.
-s ownerpwd=456 is for setting the owner password for pdf document. You can also use the parameter “-s openpwd=xxx” to set the open password.
-s keylen=2 is to control the key length as 128 bit RC4 encryption.
-s permission=3900 is for encrypting pdf document from being done anything.
-i C:\test.txt stands for the path of source file.
-o C:\out.pdf is for specifying the name of target file.
If you have input all the commands shown above, you can click “Enter” button to run the conversion from txt to pdf.
If you want to know more commands about the command line application, please click the following link: http://www.verypdf.com/artprint/document-converter/help.htm.