Setting the width and height of web browser when converting html to png

Using a suitable software and taking the right way to convert html to png will be half work and double results.This article will recommend you a practical software which will be a great help in your office work.Maybe you have never heard about this software.If you finished in reading this essay,you will love the software--HTML Converter Command Line.

HTML Converter Command Line is a powerful HTML conversion software which allows you to create previews or thumbnails of web pages in a number of different formats, such as TIF, TIFF, JPG, JPEG, GIF, PNG, BMP, PCX, TGA, JP2 (JPEG2000), PNM, etc. It also allows you to convert web pages to PDF, PS (postscript), WMF, EMF vector formats.

You can call HTML Converter Command Line from within ASP, VB, VC, Delphi, BCB, Java, .NET and COM+ etc. program languages. It uses advanced techniques to allow efficient asynchronous multithreaded operations.

If you want to download HTML Converter Command Line,please visit It will be a zip file when HTML Converter Command Line is just downloaded into your computer and you need to unzip it.

You can convert html to png format and set the width and height of web browser like the following steps.

1.Run cmd.exe dialog box.

It will be a very easy start to open cmd.exe dialog.You can click “start”—“run” and input “cmd” in “open” edit box in “Run” dialog box,then click “OK” button.Please see Figure1 and Figure2.





There’s also another way to open “Run” dialog box showed in Figure2.Just press “Windows”+ “R” combination.Then you will see cmd.exe dialog pop up and you can change the current directory to any directory by command “cd” which means change directory.

2.Input DOS commands

The command line which needs to be inputted in cmd.exe dialog box contains called program,parameter,source file and target file.It has a basic structure and you can type your command line refer to the structure as follow:

htmltools.exe –bwidth value –bheight value “” output.png

htmltools.exe  stands for the called program in the conversion of html to png.It is also the executable file in software HTML Converter Command Line.

–bwidth value –bheight value stands for the parameter—width and height of web browser.

“”   can be seen as source file.When the conversion is started by clicking “Enter” button,htmltools.exe will search for the information on the webpage and download them.

output.png  stands for the target file.

Please see Figure3.You will get an example command line about converting html to png format.



"C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe" -bwidth 15 -bheight 20 "" verypdf.png

"C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe"   is the path of htmltools.exe,which can be copied and pasted in the dialog.Of course,you can drag the file into cmd.exe dialog for saving time.

-bwidth 15 -bheight 20 is the value of width and height which can be set by yourself.

“  is the URL of webpage.

verypdf.png  is the name of target file.

3.Find the target file.

You can find the target file in current directory.Please see Figure4.



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

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!