The following will show you how to take four steps to set PDF producer andvia command line.
1. Save the web page
If you are viewing a web page and want to convert thefile, you can first save the web page as a format like HTML. For instance, if you are using Firefox to view the web page, you can do as follows: Click the “File” on the tool bar; > select “Save Page As” from the menu; > When the “Save as” dialog box pops out, you can select a directory in the list box; > enter the full file name, including the file extension like HTML in the as “File name”. > Click “Save” to save the web page on your computer. In this article, we save the web page on disk D and named it in.html.
2. Run the command prompt window
- Click “Start” in the lower-left corner of the screen to open up the “start” menu;
- 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. Type a command line
The command line you are going to type in the command prompt window should be composed of four essential items. Moreover, the items must be typed in order with a space between each other. The mentioned items are the directory of the executable file, the command which can be set PDF producer, the directory of the input file and the directory of the output file.
The command for PDF producer setting is -producer <string>. The angle brackets are often used to enclose essential contents. string refers to character string, which is always enclosed by quotation marks “” when appears in a command line.
The following is an example of command line that can be used to set PDF producer as “pdf producer” and convert MHTML to PDF. You can replace all the directories and the character string in the command, according to your priorities.
D:\htmltools\htmltools.exe -producer "pdf producer" D:\in.html C:\out.pdf
- D:\htmltools\htmltools.exe ----represents the executable file in the folder called htmltools on disk D.
- -producer "pdf producer" ---- the command that can be used to set "pdf producer" (without quotation marks) as the new created PDF’s producer.
- D:\in.html ---- represents the web page which has been saved as the format HTML and named in on disk D.
- C:\out.pdf ---- represents the PDF file named out on disk C.
4. Press “Enter”
When you press “Enter” on the keyboard, the computer will begin to convertand set PDF producer right off. When “result =OK” displayed in the command prompt window, that means the computer has accomplished conversion. Then you can find the producer information by right clicking the icon of the result PDF file. >Then, select “properties” from the drop down menu to open the “Properties” dialog box.>Click the tab “PDF” in the dialog box and you can find the information in the middle.