HTM is a web file format that can be used to store Hypertext Markup Language file. HTM files can serve the same purpose as HTML files but are much less commonly seen than HTML files. If you want to convert HTM to PDF, your best solution is VeryPDF HTML Converter Command Line, which was designed to render web pages quickly and accurately. VeryPDF HTML Converter is the right HTML converter solution to be setup on web-servers, used from service, launched within other programs from the VeryPDF HTML Converter Command Line. After you install it, please follow the steps below to and convert HTM to PDF on your own.. To download this document converter, please click
Step 1: Open the command prompt window
To open the command prompt window will need four steps: click “Start” in the lower-left corner of the computer screen; > click “Run” on the menu; > When the “Run” dialog box appears, enter “cmd” in it. > Click “OK”.
Step 2: Type a
When you see the command prompt window on your screen, please type the following four items in order in the command prompt window: the directory of the executable file, the command for margin setting, the directory of the input file and the directory of the output file. Maybe you would like to take a look at the following pattern which includes the four items.
htmltools -margin <string> <HTM file> <PDF file>
- htmltools is the main executable file of VeryPDF HTML Converter Command Line.
- -margin <string> is the command that can be used to set page margin to PDF file. The angle brackets are used to enclose essential elements. string here refers to character strings. The parameter value following –margin can be divided into four types:
- -margin 10 : Set margin to 10pt to left
- -margin 10x10 : Set margin to 10pt to left, top
- -margin 10x10x10 : Set margin to 10pt to left, top, right
- -margin 10x10x10x10 : Set margin to 10pt to left, top, right, bottom
- HTM file is the input file.
- PDF file is the output file.
The following is a good example of command line. It consists of the four items mentioned above, and includes the directories of the files.
D:\htmltools\htmltools.exe -margin 20x20 C:\in\*.htm D:\out\*.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.
- -margin 10x10x10 ---- the command that can be used to set margins to 10pt to left, top and right.
- C:\in\*.htm ---- the directory of the input files. The wildcard * represents all the input HTM files in the folder in on disk C. The file extension specifies HTM as the input format.
- D:\out\*.pdf ---- the directory of output files. Here, the file extension specifies PDF as the output format. It indicates that all the result files should be placed in the folder out on disk D.
If you like, you can replace the directories in the example above with the directories of the files in your computer first, then copy it and paste to the command prompt window.
Step 3: Press “Enter”
After you type the command line, you can press the key “Enter” to order the computer to convert HTM to PDF and leave margins to the left, top and right of the page. When you see “result=OK” in the command prompt, it means the computer has converted one of the files.To buy the full version of VeryPDF HTML Converter Command Line, please click Purchase. To learn more about how to convert HTM to other files, please read related articles at the knowledge base of VeryPDF. To find more products, please visit the home page of VeryPDF.