Purepage - the best way to share information online

Contact   ::  Privacy policy   ::  About us

Products menu Download menu Support menu Buy menu

 Purepage Server

 Purepage SDK

 Purepage for Documentum

 Purepage Server

 Purepage SDK

 Home

 Frequently Asked Questions

 Online Documentation

 Purepage Server Pricing

 Purepage SDK Pricing

 OEM Information

 

See how it works

Supported Formats

Q & A

System Requirements

Download & Try

Licensing & Pricing

OEM Licensing

Buy Online

Purepage SDK
Simple (Beginner)

Written in VBScript for the Windows Scripting host.

This sample builds upon the SIMPLE.VBS sample above and adds a demonstration of how to use the Purepage COM objects properties. This sample can be found in the Basic\Scripts sub-folder when you download the trial version of Purepage SDK.

Main points of interest include:

  • Demonstrates the use of the Purepage COM objects properties.
  • Changes the output location where the HTML files are published.
  • Provides a good base to build upon.


' Windows Script Host Sample Script
'
' This sample demonstrates the simple scripted use of the Purepage SDK from
' within the Windows Scripting Host using VBScript.  This example demonstrates
' how to change some of the Purepage PPServer objects properties.


' Declare some basic variables for later use.
Dim PPServer
Dim JobName
Dim ErrorCode
Dim Path

' Change this following line to point to the folder you
' have installed the Purepage samples on your computer:

Path = "C:\Program Files\PurePage\samples\"

' Create a Purepage PPServer object.
Set PPServer = WScript.CreateObject("PurePage.PPServer")

' Change the folder HTML jobs are saved to (OutputFolder)
' and calls each HTML file default.htm

PPServer.OutputFolder = Path & "Basic\Scripting\"
PPServer.HtmlFilename = "default"
PPServer.HtmlExtension = ".htm"

' Lock the Purepage printer, print a document and
' get the printed job name for the printed document.

PPServer.StartPrint
PPServer.PrintFiles 0, Path & "Documents\Sample.doc" & vbCrLf, 1
JobName = PPServer.GetLastPrintedJob
PPServer.StopPrint

' Convert the printed job to HTML.
ErrorCode = PPServer.ConvertPrintedJobToHTML(JobName, 0, 0)
PPServer.DeletePrintedJob JobName
PPServer.CleanPrintQueue

' Handle any errors that occur during conversion.
If (ErrorCode <> 0) Then
  ErrorStr = PPServer.GetErrorString(ErrorCode)
  MsgBox ErrorStr
End If

' Destroy (free memory) of the Purepage PPServer object.
Set PPServer = Nothing
 

<< Return to Samples page   Next Example >>

 

 See how it works...

 Scripting Examples

 HTML Rendition Samples

 Supported Document Formats

 

 

Download and try the 15-day trial.

© 2001 - 2003 Inzone Software Limited. All Rights Reserved.

Contact : Privacy Policy : About Us