Convert PowerPoint to PDF and set PDF password by command line

VeryPDF Document Converter (docPrint Pro) can help you convert PowerPoint to PDF and set PDF password by command line. As for password setting, Document Converter supports both open password setting and owner password setting.

VeryPDF Document Converter has four applications. This article will focus on the application docPrint Pro Command line. After you download Document Converter, you can find an executable file named doc2pdf.exe in the installation directory. This executable file doc2pdf.exe is docPrint Pro Command line. Now, let see how to take two steps to PowerPoint to PDF and set PDF password:

Firstly, to use docPrint Pro Command line, you should open a command prompt window. For instance, if you are a Windows XP user, please do as follows:

  • Open up the command prompt window by clicking the Start button on the left end of the task bar.
  • Click Run on the Start menu to open the Run dialog box.
  • Type cmd in the Run dialog box
  • Click OK in the Run dialog box or press Enter on the keyboard.

Then, the command prompt window will pop out. No matter which way you used to open the command prompt window, the next step is always the same.

Secondly, you should type a command line in the command prompt window. The command line must base on the usage of doc2pdf.exe. To see the usage and options, you can type the directory of the path name of this executable file in the command prompt window and press Enter. The following repeats the usage and some related options:

Usage: doc2pdf [options] <-i Document Files> [-o Output]

Related options:

-s openpwd=XXX    : set 'open password' to PDF file
    -s ownerpwd=XXX   : set 'owner password' to PDF file
-s keylen=XXX     : key length (40 or 128 bit)
        -s keylen=0   : 40 bit RC4 encryption (Acrobat 3 or higher)
        -s keylen=1   : 128 bit RC4 encryption (Acrobat 5 or higher)
        -s keylen=2   : 128 bit RC4 encryption (Acrobat 6 or higher)
-s permission=XXX : set permission to PDF file
        -s permission=0    : Encrypt the file only
        -s permission=4    : Deny printing
        -s permission=8    : Deny modification of contents
        -s permission=16   : Deny copying of contents
        -s permission=32   : No commenting

When you want to set open password, you need to use the following two options: -s openpwd=XXX and -s keylen=XXX.  When you set owner password, you need to use three options: -s ownerpwd=XXX , -s keylen=XXX and  -s permission=XXX. The following are some examples:

    1. doc2pdf -s openpwd=2396 -s ownerpwd=4565 -s keylen=0 -s permission=4 -i C:\in.ppt -o D:\out.pdf
    2. doc2pdf -s openpwd=2346 -s keylen=0 -i C:\in.pptx -o D:\out.pdf
    3. doc2pdf -s ownerpwd=4569 -s keylen=2 -s permission=32 -i C:\in.ppt -o D:\out.pdf
    4. doc2pdf -s openpwd=2396 -s ownerpwd=4565 -s keylen=0 -s permission=4 -i C:\*.ppt -o D:\*.pdf

Well, this is the method you can employ to convert PowerPoint to PDF and set PDF password by command line. If you want to see more features of VeryPDF Document Converter, please visit at http://verypdf.com/artprint/index.html

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!