The following VBScript example demonstrates activePDF WebGrabber's basic page grabbing functionality using the IE Engine. Refer to KB #10543 to see this example using the Native Engine.
This file is required:
BasicIE.vbs - Code detail provided below.
Click here to download this example (includes required file):
' Get local path as varPath
arrayScr = Split(WScript.ScriptFullName, "\", -1, 1)
For i = 0 to UBound(arrayScr) - 1
varPath = varPath & arrayScr(i) & "\"
Next
' Start the conversion process
varReturn = WG.DoPrint(varIP, varPort)
If varReturn <> 0 Then Error("DoPrint") End If
' Wait for conversion result
varReturn = WG.Wait(varIP, varPort, varTimeout, "")
If varReturn <> 19 Then Error("Wait") End If
' Run WG CleanUp
WG.Cleanup varIP, varPort
' Clear Objects
Set WG = Nothing
Set APS = Nothing
' Error Handling
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
Related Articles
10545 - EngineToUseInstructs WebGrabber to use the 10576Native Engine or 10577IE Engine for page rendering.
10025 - Adding Page BreaksactivePDF WebGrabber gives you the ability to utilize custom page breaks to control your PDF output. The steps depend on the specified 10545EngineToUse:...
10548 - Configure the WGIELogin UserThe WGIELogin user account is required to use the 10577IE Engine. During the WebGrabber process, the WG...
10035 - WebGrabber hangs using IE EngineWebGrabber appears to hang when converting HTML or a webpage using the Internet Explorer Engine. The following are known symptoms that can accompany the problem:
The information in this article is for the use of activePDF Customers and Evaluation Users Only. No part of this document may be transmitted or reproduced without the express written consent of activePDF.