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

Setting PDF passwords is an easy and common way to protect PDF files. I think you can use the command line version of VeryPDF Document Converter (docPrint Pro) to convert Word to PDF and set PDF passwords. VeryPDF Document Converter supports batch conversion, supports password setting, and supports conversion from any printable file to PDF. This application can run independently without Adobe environment, and supports all Windows OS.

VeryPDF Document Converter provides both command line versions and GUI version. So, when you visit the webpage of VeryPDF Document Converter, please select the command line version to download. After you install this command line application on your computer, open the folder named docPrint Pro v5.0 and then you can find the main executable file named doc2pdf.

You should begin with opening the command prompt window. If you are in XP, please click Start to open the start menu. > Select Run from the menu. > Type cmd in the Run dialog box. > Click OK. If you are in Windows 7, for another example, click Start to open the Start Menu.> In the Start Menu search box area type cmd . > Press Enter.

When the command prompt window appears, please type a command line, based on the following pattern: doc2pdf [options] <-i Input File> [-o Output file]. To set PDF passwords, you should use the option –s openpwd=XXX or –s  ownerpwd=XXX  . For example, the following command line “c:\docPrint Pro v5.0\doc2pdf.exe” –s openpwd=123 -i c:\in.doc -o d:\out.pdf can be used to convert Word to PDF and set PDF passwords to be“123”. This application also supports batch conversion and wildcard. Hence, if you want to convert Word to PDF and set PDF password in batch, you can type a command line as the following example: “c:\docPrint Pro v5.0\doc2pdf.exe” –s openpwd=123 -i c:\*.doc -o d:\*.pdf.

Type a command line according to the circumstances on your computer, and don’t forget to press Enter on the keyboard. In the examples, all the directories and the character string after -s can be changed. Pay attention, if there is a space in a directory, the directory should be enclosed by a pair of quotation marks.

You see, only two steps are required when you use VeryPDF Document Converter to set PDF password and convert Word to PDF via command line. Is this method helpful and simple? If you have better ideas, why not share it with me? Please leave a message if you want to ask any question.

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!