How to set the margin and convert URL to PDF?

URL is the abbreviation for uniform resource locator, which refers to a website address. With the help of VeryPDF HTML Converter Command Line, you can take only four steps to set the margin and convert URL to PDF in a reliable and quick way. But at first, you should download this application by clicking VeryPDF HTML Converter Command Line and install it in your computer. It will need several seconds to install VeryPDF HTML Converter Command Line in your computer. Then, whenever you read information on the internet, and want to convert URL to PDF, you can use VeryPDF HTML Converter Command Line to solve the problem easily. The following will introduce how to set the margin and convert URL to PDF via command line.

Step 1: visit the website and save the webpage

Supposing Firefox is the browser you use to surf the internet. First, you should go to the webpage by typing the URL in the address edit box as illustrated below.

typing the URL

Then, to save the webpage, you should click “File” in the upper-left corner of the window; > click “Save Page As” in the pulling-down list to open the “Save as” dialog box. > Select a directory in the “Save in” combo box, > type a name in the “File name” edit box. By the way, the default format is HTML. > Click “Save” to save the file in the format HTML.

open the save as box

save the webpage for converting URL to PDF

Step 2: Run the command prompt window.

Four steps are required to run the command prompt window: click “Start” in the lower-left corner of the computer screen; > click “Run” on the menu; > When the “Run” dialog box appears, you should enter “cmd” in it. > Click “OK” to run the command prompt window.

open the command prompt to type a command line  in it.

Step 3: Type a command line

The command line you are going to type in the command prompt window must be composed of four items: the directory of the executable file, the command for margin setting, the directory of the input file and the directory of the output file. The following pattern may illustrate those items more clearly.

htmltools -margin <string> <HTML file> <PDF file>

  • htmltools is the executable file of VeryPDF HTML Converter Command Line.
  • -margin <string> is the command that can be used to set the margin. The angle brackets are usually used to enclose essential contents. string refers to character string. 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
  • HTML file is the input file. Remember, you have saved the webpage in the format of HTML.
  • PDF file is the output file.

The following command line can be used to set the margin and convert the selected URL to PDF in my computer. You can replace the directories in this example below with the directories of the files in your computer, and then copy and paste it to your command prompt window. This example consists of the four items mentioned above, and includes the directories of the files.

D:\htmltools\htmltools.exe -margin 10x10 C:\in\web.html D:\out\web.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 10x10 ---- the command that can be used to set the margin. With the parameter value 10x10, it can help you set the margin to 10pt to left and top when you convert URL to PDF.
  • C:\in\web.html---- the directory of the input files. The file extension shows that the input file is a webpage.
  • D:\out\web.pdf ---- the directory of output files. The file extension specifies PDF as the output format. It indicates that the original file should be converted from webpage to PDF and be placed in the folder out on disk D.

Step 4: Press “Enter”

Press the key “Enter”. Your computer will begin to convert the URL to PDF right away. When you see “result=OK” in the command prompt, it means that the computer has converted the URL 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.

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

This entry was posted in HTML Converter (htmltools) and tagged , . Bookmark the permalink.

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!