Convert Excel to PDF and encrypt PDF via command line

It’s cool when you know how to encrypt PDF and convert Excel via command line. Do you want to learn how to use a single command line to encrypt PDF file as you convert import Excel to PDF? This article will show you how to do it step by step.

Step 1: download a tool

The tool you need is a command line application which must have the capacity to convert Excel to PDF, support password setting and support batch conversion. This article recommends the command line version of VeryPDF Document Converter (docPrint Pro), which you can download by clicking VeryPDF Document Converter. In this article, when we talk about VeryPDF Document Converter, we only refer to its command line version. You can get 50 times to try it free after you install it on your hard disk.

Step 2: open the command prompt interface

You can do as follows to open the command prompt interface under Windows XP: click Start on the screen, click Run on the Start menu, type cmd in the Run dialog box and press Enter.

Step 3: type one command line and press Enter

Before you type a command line in the command prompt interface, you may need to look at the following usage, options and examples:

  • Usage : doc2pdf [options] <-i Document Files> [-o Output]
  • Option :     -p <output Flag>  : a flag for PDF output
            -p 0: overwrite if PDF file exists
            -p 1: insert before first page if PDF file exists
            -p 2: append to last page if PDF file exists
            -p 3: rename filename if PDF file exists
  •          …

  • Examples:
    1. “C:\docPrint Pro v5.0\doc2pdf.exe” -s openpwd=456 -s keylen=1 –i D:\in.xls -o E:\out.pdf
    2. “C:\docPrint Pro v5.0\doc2pdf.exe” -s openpwd=456 -s ownerpwd=456 –s keylen=0 -s permission=8 –i D:\in.xls -o E:\out.pdf
    3. “C:\docPrint Pro v5.0\doc2pdf.exe” -s ownerpwd=567 –s keylen=2 -s permission=16 -i D:\*.xls -o E:\*.pdf

The first example can be used to set open password. The second example sets both open password and owner password. The third example sets owner passwords for multiple PDF. Please type a command line according to your priority and don’t forget to press Enter.

This is the method you can use to use Excel to PDF and encrypt PDF via command line. In case you want to buy VeryPDF Document Converter (docPrint Pro), please click full version.

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!