WSC.PostScript

Download

wsc-postscript.zip
Filesize: 2.5 KiB
Platform: Windows®

Requirements:
Windows Script Host
WSC.File

WSC.PostScript is Windows Scripting Component for reading/writing local PostScript (PS) files. It employs WSC.File component to read/write PS files and offers procedural access to some common PS tasks and procedures.

Installation

Register WSCWindows Scripting Component must be registered on the end user system, in order for windows script to be able to access it. Registration is easily achieved by right clicking the WSC file in Windows Explorer, and choosing "Register" from the context menu. Windows will then enter information about the component in the registry, and enable all windows scripts (whether they are written in JScript or VBScript) to create instances of it and use it's methods. Syntax is almost the same, so following JScript example can be easily rewritten in VBScript.

Usage

There is a <tryPS.js> file in ZIP distribution which demonstrates quickly the use of the class. Class is used in the following way:

// PostScript WSC Test
var ps = WScript.CreateObject('WSC.PostScript');
ps.initPS('test.ps');
ps.coord(90,20,90,75);
ps.thickness(0.1);
ps.color(0,0,0,100);
ps.circle(20,20,2);
ps.endPS();

All units are entered in milimiters (mm), which are defined in 72dpi resolution (1 mm = 1/25.4 x 72 pt). Class has no properties and has following methods: