Convert XLS to PDF and set PDF password via command line

I know a document converter which supports command line, has the capacity to convert XLS to PDF and can help you set PDF password. The converter is named VeryPDF Document Converter (docPrint Pro). The trial version of this converter can be used free for dozens of times.

With the help of VeryPDF Document Converter (docPrint Pro), you can set PDF open passwords as well as PDF owner passwords. Do you want to have a try? Please download VeryPDF Document Converter, and install it on your computer right away. After install it, please read the following part and try to use it to convert XLS to PDF and set PDF password via command line.

Firstly, please open the command prompt window. If you are a Windows XP user, please click Start to open the Start menu. And then, please click Command Prompt on the Start menu. If you are a Vista user, please click Start, type cmd in the Start menu search box, and then press Enter. If you are a Windows 7 user, you can use the same way to open the command prompt window as in Window Vista.

Secondly, type a command line in the command prompt window, and press Enter. The command line must be in line with the basic usage of the executable file named doc2pdf.exe in the installation directory. The usage and options for password setting are shown as below:

  • Usage:doc2pdf [options] <-i Document Files> [-o Output]
  • Option:
    • -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
              …

The following are some examples.

  • doc2pdf -s openpwd=234 -s keylen=0 -i C:\in.xls -o D:\out.pdf
  • doc2pdf -s ownerpwd=234 -s keylen=1 -s permission=0 -i C:\in.xls -o D:\out.pdf
  • doc2pdf -s openpwd=234 -s ownerpwd=234 -s keylen=2 -s permission=4 -i C:\in.xls -o D:\out.pdf
  • doc2pdf -s openpwd=234 -s keylen=0 -i C:\*.xls -o D:\*.pdf

There are more options you can use to set PDF password. To see more, please type the directory of the executable file in the command prompt window and press Enter.

You see, it’s simple to use VeryPDF Document Converter (docPrint Pro) to convert XLS to PDF and set PDF password via command line.

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!