Printing with ScriptX.Services

This walk-through illustrates taking a classic document that has a controlled print experience and works only in Internet Explorer and making it work with ScriptX.Services in any browser on any platform using the minimum amount of development effort and making as few changes as possible (though more changes might be desirable).

Previously : Stage 1 - Implement a simple UI

To work with ScriptX.Services requires the  ScriptX.Services Client Library that implements compatibility to ScriptX.Addon for ScriptX.Services. The libraries can be configured with attributes describing the server to use.

The ScriptX.Services Server in use is ScriptX.Services for Windows PC which default listens on, port 4991. We can use the same license as we used with ScriptX.Add-on.

The following new code is needed:

<!-- Add.on to compatibility -->
<script src="//"

That is all that is needed.

Browse to the sample

ScriptX.Services for Windows PC must be running on the PC. The services will not start on demand but they are started whenever a user logs-in.

If unsure, use the  ScriptX.Services dashboard to check.

Open your browser (any browser) and go to the address

  • If you have used Internet Explorer note that nothing has changed, everything works exactly as before (ScriptX.Add-on is still being used).
  • If you use a browser such as Google Chrome or Microsft Edge then the buttons can be used to print the page.

If you use Internet Explorer then the ScriptX.Services Client Library does nothing and ScriptX.Addon implments printing.

If you use an evergreen browser then it will ignore the <object /> tags of ScriptX.Addon and the ScriptX.Services Client Library will implement a "factory" object and "factory.printing" in javascript and will use ScriptX.Services for printing.

What does not work with ScriptX.Services as it does with ScriptX.Add-on
  • Print preview is not supported currently.
  • The default is no prompt when printing - with ScriptX.Add-on the default is to prompt.
  • Using the print options from the browser Print menu gives the browser print experience as it has not been overridden by ScriptX.Services.
Using other ScriptX.Services Servers

To use ScriptX.Services on Cloud or ScriptX.Services for On-Premise Devices then the attributes change, for example, to work with ScriptX.Services for On-Premise Devices:

<script src="//"
Next up: Stage 3 - Summary and review