When you convert HTML to PDF, some of you may need to set PDF subject. The PDF subject can help readers know what is discussed, presented or described in the PDF file. Maybe you don’t have any Adobe product installed in your computer, but want to set PDF subject as you batch convert HTML to PDF. Under such circumstances, you are recommended to use, VeryPDF HTML Converter, which can perfectly and quickly solve the problem. Actually, VeryPDF HTML Converter allows you to set PDF subject and convert HTML to PDF in batch in two ways. You can either choose to set PDF subject and convert HTML to PDF via command line, or to do it via GUI (graphical user interface). This article will show you how to take four steps to set PDF subject and convert HTML to PDF via command line.
1. Download VeryPDF HTML Converter Command Line
- Please click VeryPDF HTML Converter Command Line to download the of VeryPDF HTML Converter. Then it will take several seconds to install it in your computer.
- If you like it and want to buy it, please click Purchase to buy VeryPDF HTML Converter Command Line.
2. 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.
3. Enter a command line
When the black and white command prompt window appears on the computer screen, you can go to enter a command line in it. The following command line syntax may tell you what should be included in the command line.
htmltools.exe -subject <string> <input file> <output file>
According the command line syntax above, the command line should consist of four items. Hence, 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. 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, 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.
For example, the following command line can be used to set “command line application” as the PDF subject and convert HTML to PDF.
D:\htmltools\htmltools.exe -subject "command line application" D:\*.html C:\*.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 "command line application" (without quotation marks) as the PDF subject.
- D:\*.html ---- the directory of the input files. It represents all the HTML files on disk D.
- C:\*.pdf ---- specifies PDF as the output format. It indicates the computer to export all the result PDF file into disk C.
4. Press “Enter”
Press the “Enter” key to let the computer convert HTML to PDF. Meanwhile, you can view the information of conversion such as the conversion time in the command prompt window. When you see “result =OK” displayed in the command prompt window, that means one conversion from HTML to PDF has been done.