Do you mean that you want to convert a web page to PDF first and then insert the new created PDF page or pages to an existing PDF file later? If so, I would like to introduce two ways to convert a web page to PDF at first. When the selected web page is very long, you can either choose to convert it to a PDF file with only one page, or convert it to a PDF file with multiple pages. It’s very easy for you to convert a long web page to multiple PDF pages, for there are a lot of document converters that have the capacity to do so. However, if you want to convert a long web page to one PDF page, you will need a very professional one such as VeryPDF HTML Converter Command Line. If you are interested in VeryPDF HTML Converter Command Line, you can get your 50-time free trial by clicking VeryPDF HTML Converter Command Line. The following will show you how to take only four steps to convert a web page to a PDF page and insert the PDF page to an existing PDF file.
Step 1: Save the selected web page
To save the web page you are viewing in your computer, you can move the mouse to the upper-left corner of the browser such as Mozilla Firefox to click “File”. > Click “Save Page As” . Then the “Save As” dialog box will pop out.
Then, you should select a directory in the “Save in” list control, >type a name in the “File name” combo box, > select a format such as HTML in the “Save as type” combo box, > and click “Save” to save the web page. Here we save the web page in the format HTML and named it as “1”.
Step 2: Run the command prompt window
- After that, you can run the command prompt window as follows:
- 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 it.
- Click “OK” to run the command prompt window.
Step 3: Type a command line
To meet your needs, the command line should consist of the following four items: the directory of the executable file, the command which can be used to insert the PDF page, the directory of the input file and the directory of the output file. The pattern below may illustrate those items more clearly.
htmltools -append <int> <HTML file> <PDF file>
- htmltools refers to the executable file of VeryPDF HTML Converter Command Line.
- -append <int> is the command which can be used to insert the PDF page. The angle brackets are used to enclose essential contents. int stands for integer. You are allowed to choose one of the following numbers as the parameter value of the command: 0, 1, 2 and 3.
- -append 0 can be used to overwrite an existing PDF file;
- -append 1 can be used to insert the PDF page(s) before the first page of the existing PDF file;
- -append 2 can be used to add the PDF page(s) to the end of the existing PDF file;
- -append 3 can be used to rename the filename, avoiding the duplication of name.
- HTML file represents the web page, which is of course the input file. Remember?We have save the web page in the format HTML in step 1.
- PDF file refers to the output file.
The following command line is a good example, for it includes the four items mentioned above, and uses the directories to represent the files. If you also want to insert PDF page to the first page of the existing PDF file, you should use append 1. All 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\1.html 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 can be used to insert the PDF page before the first page of the existing PDF file.
- C:\in\1. html ---- the directory of the input file named 1 in the format HTML.
- 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 the input file before the first page of the PDF file. If there is no such a PDF file, this will be the new created output file.
Step 4: Press “Enter”
Press the key “Enter”. Then the computer will begins to insert the PDF page and convert the web page to PDF. When you see “result=OK” displayed in the command prompt window, that means it has converted the web page to PDF. If you want 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.