MHT is a web file format, which can be used to archive Web pages. If you want to set PDF subject as you convert MHT to PDF, you can use VeryPDF HTML Converter to get the job done. VeryPDF HTML Converter has two versions. Those who like to convert documents via GUI (graphical user interface can download the VeryPDF HTML Converter GUI version; those who prefer to convert MHT to PDF and set PDF subject via command line can click VeryPDF HTML Converter Command Line to download the of VeryPDF HTML Converter. This article will introduce the quickest way to set PDF subject and convert MHT to PDF via command line in three steps:
1. Run the command prompt window
After you download and install the VeryPDF HTML Converterin your computer, please follow the four steps below to run the command prompt window:
- Click “Start” in the lower-left corner of the screen;
- Select “Run” from the menu to open the “Run” dialog box;
- Enter “cmd” in the “Run” dialog box.
- Click “OK” to run the command prompt window.
2. Enter a command line
When the black and white command prompt window appears on the computer screen, please enter a command line in it. The following command line syntax maybe helpful, if you don’t know what should be included in a command line.
htmltools.exe -subject <string> <input file> <output file>
According the command line syntax above, first, you should enter the directory of theof VeryPDF HTML Converter. Second, you should use –subject to define the PDF subject of the PDF file and its value can be a string. For instance, if you want to define the PDF subject as “command line application”, you should enter –subject “command line application”. Third, enter the directory of the input file. Fourth, enter the directory of the output file. In addition, the angle brackets are used to enclose essential contents. string refers to character string, which should be marked by quotation marks “” when appears in a command line.
Taking the following command line as an example, it can be used to define the PDF subject as “command line application” and convert MHT to PDF.
D:\htmltools\htmltools.exe -subject "command line application" D:\in.mht C:\out.pdf
- D:\htmltools\htmltools.exe ----can be used to call the command line application located in the folder called htmltools on disk D.
- --subject "command line application" ---- can be used to define PDF subject as "command line application”
- D:\in.mht ---- the directory of the input files. It represents the MHT file named in on disk D.
- C:\out.pdf ---- specifies PDF as the output format and can specifies out as the name of the result PDF file on disk C.
3. Press “Enter”
Press the “Enter” key. And your computer will convert MHT to PDF without delay. At the same time, you can view the process of conversion such as the conversion time in the command prompt window. Each time one file has been converted from MHT to PDF, you can see “result =OK” displayed in the command prompt window.