Convert HTML to PDF using activePDF WebGrabber

Note:
This solution requires the component to be installed first.
To download the installer,
click here
Introduction
The following VBScript example demonstrates activePDF WebGrabber's basic page grabbing functionality using the IE Engine.
Detail
VBScript
arrayScr = Split(WScript.ScriptFullName, "\", -1, 1)
For i = 0 to UBound(arrayScr) - 1
varPath = varPath & arrayScr(i) & "\"
Next
varEngine = 1
or "file://folder/file.htm"
varURL = "http://www.activepdf.com/support/knowledgebase/view.cfm?kb=10544&code=vbs"
varTimeout = 60
varIP = "127.0.0.1"
varPort = "64320"
Set WG = CreateObject("APWebGrabber.Object")
Set APS = CreateObject("APServer.Object")
APS.OutputDirectory varPath
APS.PDFTimeout = varTimeout
WG.Prt2DiskSettings = APS.ToString()
WG.EngineToUse = varEngine
WG.URL = varURL
WG.TimeOut = varTimeout
WG.PrinterTimeout = varTimeout
varReturn = WG.DoPrint(varIP, varPort)
If varReturn <> 0 Then Error("DoPrint") End If
varReturn = WG.Wait(varIP, varPort, varTimeout, "")
If varReturn <> 19 Then Error("Wait") End If
WG.Cleanup varIP, varPort
Set WG = Nothing
Set APS = Nothing
Sub Error(Method)
Msgbox "'" & Method & "' failed with a '" & varReturn & _
"'" & VBCRLF & "KB article on Return codes:" & VBCRLF & _
"http://www.activepdf.com/support/knowledgebase/viewKb.cfm?id=10033&tk=ts"
Set WG = Nothing
Set APS = Nothing
Wscript.Quit
End Sub
Visit
activePDF
for more information and more samples.