How to convert DOC to PDF and set PDF passwords via command line?

The command line version of VeryPDF Document Converter (docPrint Pro) provides a very convenient way to set PDF passwords when you use it to convert DOC to PDF via command line. No matter how many documents you want to deal with, only a single command line would be enough for you to convert DOC to PDF and set PDF passwords.

Do you want to try it free? Please click Trial Version to download the command line application of VeryPDF Document Converter. And start your 50-time trial. After installing it on the computer, please do as follows:

First, you should open the command prompt window. If you are in Windows XP, for instance, you should open the command prompt window by clicking Start on the screen, > clicking Run on the Start menu, > typing cmd in the dialog box, > pressing Enter.

As soon as the command prompt window appears on the screen, you can type a command line in it. The single command line should include the path of the executable file named doc2pdf, the options which can be used to set PDF passwords, the path of input file(s) and the path of the output file(s). The following are the basic usage, some options for PDF password setting, and some examples:

Usage: doc2pdf [options] <-i input file> [-o output file]

Some options for PDF password setting:

    -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

Examples:

  • doc2pdf -s openpwd=345 -s ownerpwd=456 -s keylen=0 -s permission=3900 -i D:\in.doc -o E:\out.pdf
  • doc2pdf -s ownerpwd=456 -s keylen=0 -s permission=0 -i D:\in.doc -o E:\out.pdf
  • doc2pdf -s ownerpwd=456 -s keylen=0 -s permission=4 -i D:\*.* -o E:\*.pdf

After type a command line, don’t forget to press Enter. VeryPDF Document Converter can quickly convert DOC to PDF and set PDF passwords.

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!