How to enable 'basic' printing

A 'basic' ScriptX-enabled document is defined as one on which the ScriptX object block appears thus:

<!-- MeadCo ScriptX -->
<object id=factory style="display:none"
  classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  codebase="http://[your path here]/smsx.cab#Version=7,6,0,10 ">
</object>

For successful operation the codebase attribute must 'point' to the correct location and version number of the smsx.cab file on your servers. That 'pointer' path can be relative to the location of the document on which the ScriptX object appears, or it can be fully qualified.

Please note that only one ScriptX object can appear on any one document.

The copy of smsx.cab contained in the downloadable ScriptX Client Resource kit is updated and made freely available upon each new version release.

Pre-installing the ScriptX software

This approach is an alternative to having the control auto-download the first time a user hits a ScriptX-enabled page, and avoids the standard 'signed component' prompt with which a user is normally faced.

System administrators wishing to pre-install ScriptX over an intranet should obtain the downloadable ScriptX Client Resource kit. The kit for ScriptX version 7 and later contains ScriptX.msi (previous releases of the kit contained the 'legacy' smsx.exe). Whichever is used, is should be run on each client machine.

You will still need to reference the ScriptX object on each of your pages, however, the codebase attribute can be and should omitted since the software is already installed.

Formatting printing attributes and printing

A typical function call to set 'basic' print formatting and print a top-level document client-side could look like this:

<script>
function printWindow() {
factory.printing.header = "This is MeadCo";
factory.printing.footer = "Printing by ScriptX";
factory.printing.portrait = false;
factory.printing.leftMargin = 1.0;
factory.printing.topMargin = 1.0;
factory.printing.rightMargin = 1.0;
factory.printing.bottomMargin = 1.0;
factory.printing.Print(false);
}
</script>

 Notice that we call all ScriptX functions by reference to the ID of the on-page ScriptX object - usually 'factory'.

Please note that you can NOT use the ASP calls CreateObject or new ActiveXObject to call ScriptX from *any* client-side ScriptX-enabled page.