Convert XLS to PDF and encrypt PDF via command line

You can encrypt PDF by setting passwords, key length, and permission. VeryPDF Document Converter (docPrint Pro) provides a command line application which can help you convert XLS to PDF and encrypt PDF via command line in an easy and quick way.

After you download VeryPDF Document Converter and install it on your computer, you can find the executable file, which is an executable file and is named doc2pdf in the installation directory. This executable file named doc2pdf is the tool we need to solve the problem.

To convert XLS to PDF and encrypt PDF via command line, you need to take two steps:

The first step is to open the command prompt window.

In Windows XP, you should first open the Start menu by clicking the Start button on the screen, and then select Command Prompt on the menu.

In Windows 7 or Vista, you should click Start, type cmd in the search box on the Start menu and then press Enter.

The second step is to type a command line and press Enter. You should take a look at the usage, option, and examples before you type a command line. To view the information, you may type the directory in the command prompt window and press Enter; or just refer to the following:

  • 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=4096 : Do not encrypt metadata
              -s permission=32   : No commenting

The following are some examples.

  • doc2pdf -s openpwd=678 -s keylen=0 -i C:\in.xls -o D:\out.pdf
  • doc2pdf -s ownerpwd=456 -s keylen=1 -s permission=4096 -i C:\in.xls -o D:\out.pdf
  • doc2pdf -s openpwd=567 -s ownerpwd=567 -s keylen=2 -s permission=32 -i C:\in.xls -o D:\out.pdf
  • doc2pdf -s openpwd=778 -s keylen=0 -i C:\*.xls -o D:\*.pdf

Is this method helpful? VeryPDF Document Converter can not only help you convert XLS to PDF, it is also capable of converting documents of all regular types. If you want to get more information, please visit the following website:

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!