HTML Print

How to print HTML/MHTML/web page to image/PDF(PS/PDF/JPG/BMP/PNG/TIFF/GIF)

In this article, I would like to tell you how to print HTML/MHTML/web page to image and web page to PDF(PS/GIF/TIFF/PNG/BMP/JPG) in Windows systems.

Firstly, you need to know our main processing tool for conversion above – VeryDOC HTML to Any Converter, which is a professional command line application helping you convert HTML/web page/MHTML to image or PDF variously and flexibly. This utility is handy and powerful, which also enable developers to use it in any programming or scripting languages, e.g., ASP, PHP, C#, .NET, VB, C/C++, Delphi, etc.. To know how to use this application to accomplish conversion, please see the followings:

1. Download application

You need to download package of this application to your computer, then, open it and extract its content to your computer directly, and then, trial version of this software is in your computer so that you can use it directly for later process.

Download VeryDOC HTML to Any Converter

2. Print HTML/MHTML/web page file to image or PDF

After you run cmd.exe in your computer, command prompt window can pop on screen, where you can refer to following examples to fulfill conversion:

html2any.exe -printtopdf C:\out7.pdf https://www.verydoc.com

html2any.exe "C:\Documents and Settings\admin\Desktop\htmlprint-to-any.html"

where you need to know:

  • html2any.exe is to run this software through calling executive file “html2any.exe” here
  • -printtopdf is to print HTML/URL to file of PDF
  • C:\out7.pdf is to specify output PDF file
  • https://www.verydoc.com is to specify printing online web page – URL
  • "C:\Documents and Settings\admin\Desktop\htmlprint-to-any.html" is to specify input HTML file

Note: As you can see, the first example is to show you how to print online web page – URL to pdf, likely, you can change that parameter “-printtopdf” to another parameter, e.g., “-printtoemf”, which is to help you print web page to EMF file due to targeting file extension as .emf, etc.. And, the second example is to help you print local web page of HTML according to selected virtual printer.

After you print web page file to image or PDF file like above, targeting PDF file or image files could be produced directly.

Here is illustration about how to use VeryDOC HTML to Any Converter to print HTML/MHTML/URL/web page file to image file or PDF file through commands above. For other practical functions, please visit here frequently. Thank you for your support here.

HTML Print

How to print HTML and set printing margin

This article is about how to use VeryDOC HTMLPrint Command Line to print HTML and set printing margin with command line on Windows platforms.

VeryDOC HTMLPrint Command Line is handy and powerful, which could print large volumes of HTML, MHTML files or Web URLs in real-time. This application also is able to let developers use in various programming or scripting languages, e.g., VB, ASP, PHP, C#, .NET, C/C++, Delphi, etc.. For further trial on this application, please click following icon:

Download VeryDOC HTMLPrint Command Line

Want to know more details about printing HTML and set printing margin right now? Then, please read the following paragraphs.

1. Open command prompt window

It is essential to run cmd.exe to open command prompt window in your computer, for it is operating environment of commands in Windows systems. And when it pops on screen, you can start to use commands to process your task there.

2. Print web page of HTML and edit printing margin

VeryDOC HTMLPrint Command Line is a command application, so you need to type commands and parameters to print file of HTML and set printing margin in command prompt window. And for this, you can refer to following example:

htmlprint.exe -marginleft 10 -margintop 10 -marginright 10 -marginbottom 10 https://www.verydoc.com

htmlprint.exe -marginleft 10 -margintop 10 -marginright 10 -marginbottom 10 D:\source.htm

where:

  • htmlprint.exe is to call executive file “htmlprint.exe” to run this application
  • -marginleft 10 is to edit left margin as 10pt when printing HTML
  • -margintop 10 is to edit top margin as 10pt when printing HTML
  • -marginright 10 is to edit right margin as 10pt when printing HTML
  • -marginbottom 10 is to edit bottom margin as 10pt when printing HTML
  • https://www.verydoc.com is to specify online web page with URL
  • D:\source.htm is to specify local web page – HTM file

No matter you print HTM or print URL directly, after commands and parameters are typed in command prompt window, one click on enter can make VeryDOC HTMLPrint Command Line print file of HTML with specified margins set by you.

To know more about VeryDOC HTMLPrint Command Line, please visit here frequently for other relevant articles, besides this one, which is about how to print file of HTML and edit printing margin with commands and parameters.

HTML Print

How to specify printing resolution when printing URL/HTML/MHTML

Want to know how to specify printing resolution when printing URL/HTML/MHTML with command line right now? If so, maybe you can refer to following steps to fulfill them in one conversion.

Step1. Download

To accomplish conversion here, you need to have this software – VeryDOC HTMLPrint Command Line in your computer. So if you do not have it, please take steps below to have trial version in your computer:

Download VeryDOC HTMLPrint Command Line

Step2. Run command prompt window

Please open command prompt window firstly, for it is operating environment of commands. And you can do the followings to open it on screen:

Click hotkey Windows + R so that Run dialog box could be opened directly. Then, you need to type cmd.exe and click ok in pop dialog box, and then, command prompt window pops out automatically. Then, your commands could be typed directly.

Step3. Print HTML/MHTML/URL and specify printing resolution

In command prompt window, you can start to input commands and parameters referring to the following examples:

htmlprint.exe -xres -4 -yres -4 C:\test.htm

htmlprint.exe -xres 600 -yres 600 https://www.verydoc.com

In the examples above, you need to know:

For parameters:

  • -xres <int>: specify the printer x-resolution,
    -4: high
    -3: medium
    -2: low
    -1: draft
    number: the number of dots per inch (DPI) and is therefore device dependent
  • -yres <int>: specify the printer y-resolution

For directories:

  • htmlprint.exe is to call executive file “htmlprint.exe” to run software itself
  • C:\test.htm is to specify local web page file of HTM for printing
  • https://www.verydoc.com is to specify URL for printing

After you type commands and parameters in command prompt window, printing HTML/URL/MHTML and specifying printing resolution could be started, then printer can print targeting files due to resolution set just now.

After description about how to use VeryDOC HTMLPrint Command Line to print HTML/URL/MHTML and specify printing resolution, you can also read other articles about this software and its useful functions besides specifying resolution here with commands and parameters.

HTML Print

How to specify printing color when printing URL/HTML/MHTML

In this article, I will show you how to specify printing color when printing URL/HTML/MHTML with command line on Windows platforms.

VeryDOC HTMLPrint Command Line is our main converting tool, which allows you to print various files, e.g., online web page – URL, HTML, MHTML files through commands. Also this application could be used to set targeting properties, e.g., printing color, printer resolution, etc., so, if you would like to know more details about using this software to specify printing color when printing HTML/URL/MHTML, you can keep reading this article.

Step1. Download package

Here is package of this software for you to download:

Download VeryDOC HTMLPrint Command Line

Then, after you download package above, please extract its content to your computer in order to use this application in your computer.

Step2. Run cmd.exe

Running cmd.exe can help you open command prompt window, which is running environment of commands in your computer. The details are as follow:

Click start > select run on start menu > input cmd.exe and click ok in pop dialog box, and then, command prompt window could pop on screen directly.

Step3. Print HTML/URL/MHTML and specify printing color

After command prompt window is opened, please type commands and parameters for your own conversion referring to following examples:

htmlprint.exe -color 1 C:\test1.htm

htmlprint.exe –color 2 http://www.bbc.com

where you may need to know:

  • -color <int>: specify color or monochrome to printer
    1 : monochrome
    2 : color
  • htmlprint.exe is to call executive file “htmlprint.exe” for running software itself
  • C:\test1.htm is to specify source local web page
  • http://www.bbc.com is to specify source online web page via URL

When you finish typing commands like above, please click enter so that it can be successful to print HTML/URL/MHTML and specify printing color. If you type parameter “-color 1”, specific color could be monochrome; if you input parameter “-color 2”, targeting printed file could be colorful.

After you use VeryDOC HTMLPrint Command Line to specify printing color during printing HTML/URL/MHTML with commands, if you want to try this application, please click following icon:

Download VeryDOC HTMLPrint Command Line

HTML Print

How to set paper size during printing URL/HTML/MHTML

This article is about how to use VeryDOC HTMLPrint Command Line to print URL/HTML/MHTML and set paper size in one process with command line on Windows platforms.

When you want to print HTML/URL/MHTML and set relevant properties flexibly and professionally, VeryDOC HTMLPrint Command Line can help you with that very conveniently through commands and supported parameters. This application could also be used in various program languages, e.g., Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.. To know more about this application, welcome to visit homepage of VeryDOC HTMLPrint Command Line.

To know how to realize printing HTML/URL/MHTML and set paper size with this software, it is convenient to continue to read this article:

1. Download

Firstly, you need to download trial package of this application:

Download VeryDOC HTMLPrint Command Line

Then, please open downloaded package and extract its content to your computer directly so that trial version of this application could be applied in later conversion of yours.

2. Open command prompt window

Command prompt window is elementary environment of commands in Windows systems, so it is essential to open it on screen:

Click hotkey Windows + R > type cmd.exe in dialog box > click ok, then it can be popped on screen directly, where you can continue to type commands.

3. Print HTML/URL/MHTML and set paper size

After command prompt is opened, you can refer to following examples to input commands and parameters to set paper size during printing HTML/URL/MHTML with commands:

htmlprint.exe -printer docPrint –paper “215.9x279.4mm” https://www.verydoc.com

htmlprint.exe -printer docPrint –paper “612x792pt” C:\printer.htm

  • htmlprint.exe is to call executive file “htmlprint.exe” which is to use this command application for conversion later
  • -printer docPrint is to call virtual printer “docPrint” (it is one of our products, and to know more about it, please go to homepage of Document Converter)
  • –paper “215.9x279.4mm” is to set specific paper size through mm
  • https://www.verydoc.com
  • –paper “612x792pt” is to set specific paper size through pt
  • C:\printer.htm is to specify web page file for source file

where:

-paper <string>: set paper size to printer

  • number: standard paper size
  • others: user defined paper size

After you follow steps above to print HTML/URL/MHTML with specific paper size, you can get processing window, and when it disappears, due to selected printer, e.g., docPrint printer, program can provide you with a dialog box, then, you can save targeting files flexibly. Also paper size set just now could work. As you can see, here is description about how to use VeryDOC HTMLPrint Command Line to print HTML/URL/MHTML with specific paper size. To know more articles about this application, please keep visiting here.