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.
(2)Then you should input commands in cmd.exe.Please look at 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.
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.
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.
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.
and run this .bat file,you will convert more web pages or URLs to pdf files at one time.