Convert PPT to PDF and set PDF password by command line

When convert PPT to PDF by command line, there are two types of passwords you can set: the owner passwords and the open passwords. If you have VeryPDF Document Converter (docPrint Pro), you can easily set PDF passwords no matter how many PPT do you have at hand.

VeryPDF docPrint Pro Command Line, the command line application that is provided by VeryPDF Document Converter is the tool that you are going to need. The following are the two steps you need to take to convert PPT to PDF and set PDF password:

The first step is to open Command Prompt which is the native program provided by Windows. Different ways may be required to open Command Prompt. If you are in Window XP, you should click Start, click All Programs, click Accessories and then click Command Prompt. If you are in Windows 7, you should click Start, type cmd in the Search box on the Start menu, and then press Enter. The Command Prompt window appears on the screen, and you proceed to the next step.

The second step is to type a command line. The basic usage of docPrint Pro Command Line, which also refers to the executable file doc2pdf.exe in the installation folder, is as follows:

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

The options that can be used to set PDF passwords are as follows:

-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=3900 : Deny anything
        -s permission=4    : Deny printing
        -s permission=8    : Deny modification of contents
        …      
Tips:

  • When set open passwords, you must use the following two options: -s openpwd=XXX and -s keylen=XXX   
  • When set owner passwords, you need the following three options: -s ownerpwd=XXX, -s keylen=XXX and -s permission=XXX.

Examples:

  • doc2pdf -s openpwd=666 -s keylen=1 -i C:\input.ppt -o C:\output.pdf
  • doc2pdf -s ownerpwd=777 -s keylen=1 -s permission=4 -i C:\input.ppt -o C:\output.pdf
  • doc2pdf -s openpwd=666 ownerpwd=777 -s keylen=2 -s permission=8 -i C:\input.ppt -o C:\output.pdf
  • doc2pdf -s openpwd=666 ownerpwd=777 -s keylen=2 -s permission=8 -i C:\*.ppt -o C:\*.pdf

Please type your command line depending on your needs and then press Enter to get the process started.

This is the method that you can employ to convert PPT to PDF and set PDF passwords. If you want to view more options as well as examples, please type the path of the executable file in the window and press Enter. If you are interested in other applications provided by VeryPDF Document Converter, please visit: 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

This entry was posted in docPrint Pro and tagged , , . Bookmark the permalink.

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!