Convert MHTML to PDF and set PDF password

There is a professional web file converter called VeryPDF HTML Converter that supports command line, password setting and batch conversion. You can use it to convert MHTML to PDF and set PDF password via a single command line in only two steps. This article will introduce how to use it to solve your problem. Please download the command line version of this HMTL converter by clicking VeryPDF HTML Converter Command Line at first, and then, after you install it on your computer, you can do as follows to convert MHTML to PDF and set PDF password.

1. open the command line window

Using command line is often the quickest way to run applications and to open folders and files. You should first click Start; the, click Run on the menu. After that, type “cmd” in the Run dialog box and press OK to open the command line window.

2. type a command line

When you set PDF password and convert MHTML to PDF, you are provided with two options: [-ownerpwd<string>] can be used to set an owner password, or [-openpwd<string>] can be used to set an open password. When you use either of the options to set PDF password, it requires the appearance of [-keylen <int>], which is used to set key length.

  • -keylen 0: 40 bit RC4 encryption (Acrobat 3 or higher)
  • -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher)
  • -keylen 2: 128 bit RC4 encryption (Acrobat 6 or higher)

If you want to set a PDF owner password, please type a command line according to usage 1:

htmltools [-ownerpwd<string>][-keylen <int>] < MHTML file> [<PDF file>]

If you want to set a PDF open password, please type a command line according to usage 2:

htmltools [-openpwd<string>][-keylen <int>] < MHTML file> [<PDF file>]

For instance, d:\htmltools\htmltools.exe -ownerpwd "234" -keylen 2 c:\in.mhtml d:\out.pdf can be used to set owner password when convert MHTML to PDF. The following example can be used to set open password: d:\htmltools\htmltools.exe -openpwd "234" -keylen 2 c:\in.mhtml d:\out.pdf.

After you type a command line, please press Enter. To check the result, you can open the result PDF file. If it is protected by an owner password, you will see a lock icon on the left part of the PDF file. If it is protected by an open password, when you open it, a dialog box will pop out. To buy VeryPDF HTML Converter Command Line, please click Purchase.

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!