How to convert html to pdf format?

By using the software HTML Converter Command Line,you can convert html to pdf file.HTML Converter Command Line allows you to convert web pages to PDF, PS (postscript), WMF, EMF vector formats.It support one URL to one pdf file and batch conversion.

HTML Converter command line application can be called from within ASP, VB, VC, Delphi, BCB, Java, .NET and COM+ etc. program languages. It uses advanced techniques to allow efficient asynchronous multithreaded operations.

This article will teach you how to convert html to pdf file from one to one and many to many(batch conversion).

1.One to one

(1)Please run cmd.exe.You should click “start” – “run” like figure1 and input “cmd” in “open” edit box in the popup dialog,then click “OK” like figure1.

image

                                   figure1.

image

                                   figure2.

(2)Then you should input commands in cmd.exe.Please look at figure3.

image

                                                                      figure3.

The commands are "C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe" "www.verypdf.com"

"C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe"  is the directory of htmltools.exe.

“www.verypdf.com”  is the URL of webpage.

There is no information about the target file in the commands.Htmltool will help you to convert the source file to pdf file by default if you don’t specify the output file and the pdf file will be saved in current directory automatically.Please look at figure4.

image

                                                                      figure4.

But if you specify the directory of target file,the file will be saved in the location you have set.For example,the commands are "C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe" “www.verypdf.com”  "C:\Program Files\verypdf.pdf"

The target file will be saved in specified directory—“C:\Program Files\” with the name verypdf.

2.Batch conversion(many to many)

Htmltools can not only batch convert local html to pdf files,but also the webpage or URLs.

2.1 local batch conversion of html to pdf

(1)Run cmd.exe and input commands showed in figure5.

image

                                                                   figure5.

The command line of batch conversion are "C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe" "D:\test\html\*.html"

"C:\Documents and Settings\admin\Local Settings\Temp\htmltools\htmltools.exe"  stands for the directory of htmltools.exe.

"D:\test\html\*.html"  stands for the path of source files.You should pay attention to *.html which means batch converting html files.

There is no information about the target files and they will be saved in the same folder with source files using the same file name but converted to pdf format.Please look at figure6.

image

                                                                         figure6.

2.2  Webpage batch conversion of html to pdf

If you want to batch convert html of webpage to pdf files,you can input commands line as follows.

htmltools.exe https://www.verypdf.com verypdf.pdf
htmltools.exe
http://www.verydoc.com verydoc.pdf
htmltools.exe
http://www.google.com google.pdf

and run this .bat file,you will convert more web pages or URLs to pdf files at one time.

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!