HTML, the HyperText Markup Language, is the most extensively used makeup language for making web pages. As a makeup language (ML), HTML employs makeup tags to describe web pages and control the display behaviors of page elements. The HTML makeup tags are description keywords enclosed in angle brackets, such as “<script>”. Most of these tags are paired like “<tr>” and “</tr>”. The first tag in a pair is always called the start or opening tag and the second one is called end or closing tag, correspondingly. There are also some tags not in pairs, for example, “<img>”. A web browser interprets the tags to convert HTML documents and elements to visible pages remaining the tags invisible. Then the viewer can see or hear the texts, images, videos and audios provided by the HTML documents. This article is to present a way of converting document of html to image.
Below are some examples for converting html to image, such as jpg, png, and gif. The VeryPDF HTML Converter Command Line tool is used for completing the conversion.
This is an example of converting html to jpg:
The commands for converting a document of html to image of jpg are as follows:
D:\htmltools\htmltools.exe D:\htmltools\Verypdf.html D:\htmltools\Verypdf.jpg <Enter>,
where “D:\htmltools\htmltools.exe” is for running the executable component of the conversion tool, “D:\htmltools\Verypdf.html” points to the name of the source html document and “D:\htmltools\Verypdf.jpg” specifies the output file path, name and target format of jpg.
The coming two screen snapshots show the process the conversion and the viewing effect of the converted jpg image in its actual size.
The last snapshot is from the property information window of the converted jpg image showing the width of 800 pixels, the height of 776 pixels, the resolution of 96 dpi and the bit depth of 24. Note that the width and height of the converted image are dependent on your source html documents.
Below are the commands for converting a document of html to png and gif:
for html to png,
D:\htmltools\htmltools D:\htmltools\Verypdf.html D:\htmltools\Verypdf.png <Enter>
for html to gif,
D:\htmltools\htmltools D:\htmltools\Verypdf.html D:\htmltools\Verypdf.gif <Enter>