Convert HTML to PDF and encrypt PDF

When people want to protect their PDF files, they usually set passwords and set encryption options to prevent their PDF file being read, opened, copied, and printed. An open password or user password can be used to prevent the PDF from being opened and read. An owner password can be used to prevent the PDF file from being copied, modified or printed. VeryPDF HTML Tools Command Line has the capacity to help you convert HTML to PDF and encrypt PDF via a single command line. You can download this application by clicking HTML Tools Command Line.

After you install this command line application on your computer, you can do as follows to quickly encrypt PDF as you convert HTML to PDF.

1. Open the command prompt window

In Windows XP, please open the command prompt window as follows:

    1. Click Start,
    2. Select Run from the Start menu to open the Run dialog box,
    3. Type “cmd” in the Run dialog box,
    4. Click Ok in the Run dialog box.

2. Type a command line

Please take a look at the following basic usage of VeryPDF HTML Tools Command Line and some related options before you type a command line. You can also type the directory of the executable file named htmltools and press Enter to see all the options and other usages of this application.


  • htmltools [options] <EMF-WMF-HTML-URL-RTF-file> [<PDF-PS-Image-file>]

Some options:

    1. -openpwd <string> : Set 'open password' to PDF file
    2. -ownerpwd <string> : Set 'owner password' to PDF file
    3. -keylen <int> : Key length (40 or 128 bit)
        1. -keylen 0: 40 bit RC4 encryption (Acrobat 3 or higher)
        2. -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher)
        3. -keylen 2: 128 bit RC4 encryption (Acrobat 6 or higher)
    4. -encryption <int> : Restrictions
        1. -encryption 0: Encrypt the file only
        2. -encryption 4: Deny printing
        3. -encryption 8: Deny modification of contents
        4. -encryption 16: Deny copying of contents
        5. -encryption 32: No commenting


    1. d:\htmltools\htmltools.exe -openpwd "fly” -keylen 2 d:\in.html c:\out.pdf
    2. d:\htmltools\htmltools.exe -openpwd "fly” -keylen 1 d:\*.html c:\*.pdf
    3. d:\htmltools\htmltools.exe –ownerpwd "fly” -keylen 2 –encryption 16 d:\in.html c:\out.pdf
    • The first command line set open password to be “fly” and can convert a single HTML file to a PDF file protected by the password “fly”.
    • The second command line convert all the HTML file on disk D to PDF files on disk C in batch and set open passwords for all the PDF files to be “fly”.
    • The third command line convert a single HTML file to an owner password protected PDF file and the content of this PDF file cannot be copied.

After you type a command line to convert HTML to PDF and encrypt PDF, please press Enter.

The free trial version of VeryPDF HTML Tools Command Line can only be used for 50 times. If you want to get the full version of this application, please visit the product webpage of VeryPDF HTML Tools 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!