How to insert PDF pages and convert MHT to PDF?

If you are used to convert documents via GUI (Graphical User Interface), you will find that to insert PDF pages and convert MHT to PDF can consume a lot of time. If you want to save your precious time, maybe it is high time for you to learn how to convert document via command line. This article would take VeryPDF HTML Converter Command Line as an example, and show you how to use it to insert PDF pages and convert MHT to PDF in a fast and easy way. To download this command line application, please click VeryPDF HTML Converter Command Line. After you install it in your computer, you can begin with running the command prompt window.

Step 1: Run the command prompt window

  • Click “Start” in the lower-left corner of the computer screen;
  • Click “Run” on the menu to open the “Run” dialog box;
  • Enter “cmd” in the “Run” dialog box.
  • Click “OK” to run the command prompt window.

to run the comand line to type the command line to convert MHT to PDF

Step 2: Type a command line

When you see the command prompt window, you can type a command line in it. In order to insert PDF pages and convert MHT to PDF, you must make sure that the command line is composed of the following four items in order: the directory of the executable file, the command which can be used to insert PDF pages, the directory of the input file and the directory of the output file. For the sake of clarity, the following illustrates the general command pattern to show you what should be included in a command line.

htmltools -append <int> <MHT file> <PDF file>

  • htmltools is the name of the executable file of VeryPDF HTML Converter Command Line.
  • -append <int> is the command that can be used to insert PDF pages. Four parameter values are allowed: 0, 1, 2 and 3. The angle brackets enclose essential contents. int refers to integer.
    • -append 0 can be used to overwrite an existing PDF file;
    • -append 1 can be used to insert the PDF pages converted from MHT before the first page of the existing PDF file;
    • -append 2 can be used to add the PDF pages converted from MHT to the end of the existing PDF file;
    • -append 3 can be used to rename the filename to avoid the duplication of name.
  • MHT file is the input file.
  • PDF file is the output file.

Taking the following command line as an example, it includes the four items mentioned above, and uses the directories to represent the files. The directories in this example can be replaced with the directories of the files in your computer.

D:\htmltools\htmltools.exe -append 1 C:\in\lo.mht D:\out\lo.pdf

  • D:\htmltools\htmltools.exe ---- the directory of the executable file. It represents the executable file htmltools.exe located in the folder htmltools on disk D.
  • -append 1 ---- the command that can be used to insert PDF pages before the first page of the existing PDF file.
  • C:\in\lo.mht---- the directory of the input file.
  • D:\out\lo.pdf ---- the directory of output files. If there is a PDF file called lo in the folder out on disk D, the computer will insert PDF pages before the first page of the existing PDF file. If there is no such a PDF file, the computer will create a new PDF file in this directory.

Step 4: Press “Enter”

The computer prompts to insert PDF pages and convert MHT to PDF the moment you press the key “Enter”. When you see “result=OK” in the command prompt, it means that the computer has converted MHT to PDF. In order to buy the full version of VeryPDF HTML Converter Command Line, please click Purchase. To get more information about other products, please visit the home page of VeryPDF.

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!