Print HTML to Jpg and specify width and height

   VeryDOC HTMLprint to Any Converter can be used to print HTML to Jpg and specify the image width and height. You can also use this software as HTML printing tools. By it you can do the printing job and conversion job together. Jpg is one of the output image file formats, it also can output tif, gif, png and other common image file formats. When converting website to image, it allows you to set output image width and height. In the following part, I will show you how to make it work.

Step 1. Download HTMLprint to Any Converter

  • This software is command line version but for easy uploading and downloading, we have compressed it to zip file.
  • Once the downloading finishes, please extract it to some folder then you can check the elements in it.
  • Please find the readme.txt, which contains all the parameters and examples. The executable file is named as html2any.
  • If you need to check the conversion effect, please double click the bat file.

Step 2. Print HTML to Jpg

Usage: html2any.exe [options] <HTML/MHTML file or URL>

Example

  • When converting website to jpg and specify the output image quality, please refer to the following command line.
    html2any.exe -printtoimage C:\out.jpg -quality 50 http://www.verypdf.com
    -printtoimage <string>  : this is an order to print HTML document to image files
    Following this parameter, please input the full file path and specify the file name.
    -quality <int>          : Set quality (1~100) to JPEG file
    Please note that this parameter is only available for JPEG or jpg  file. By it you can control the image quality. The better the quality is, the bigger the output file size it.
  • Now let us go to solution for converting  HTML to Jpg and specify the width and height.
    html2any.exe -printtoimage C:\out.jpg -imgw 800 -imgh 1000 http://www.verypdf.com

    -imgw <int>             : Set width to out image file
    -imgh <int>             : Set height to out image file
    Here please do not be confused with those parameters. The following parameters can help you control the HTML length and width. Say if there is long HTML website but you only need 100 near the top, you can use parameter dlgheight to cut 100 from this long HTML. If you use imgh, it will convert the whole website to jpg within the long of 100.
    -dlgwidth <int>         : set width to HTML dialog
    -dlgheight <int>        : set height to HTML dialog

  • When you need to offset HTML file in X and Y directions, please use the following two parameters.

    -imgxres <int>          : Set X resolution to out image file
    -imgyres <int>          : Set Y resolution to out image file

  • When you need to control the bit count of output image file, please use parameter -imgbc which allows you to  set color depth (1, 4, 8) for out image conversion.

By here I guess you can master one way of converting HTML to Jpg and specify the output width and height. During the using, if you have any question, please contact us as soon as possible.

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!