Getting started with ScriptX.Services

A guide to help you evaluate next generation printing in the browser with ScriptX.Services.

ScriptX.Services enables the consistent appearance and formatting of HTML content printed from a browser. It is our evolving cross‑browser solution, printing across the cloud, or to devices connected to on‑premise servers or individual PC workstations.

ScriptX.Services wraps the tried and trusted technology of ScriptX.Add‑on with a web API and adds a web server which can be installed on a local Windows server (for centralised printing) or on a user's own Windows PC workstation (for local printing).

We also provide ScriptX.Services for Cloud, a variant that is available for FREE on the public internet (subject to a fair use policy) and that prints ScriptX-enabled web pages to PDF files from pretty much any modern browser running on any device!

To evaluate the features and functionality of ScriptX.Services, and to get a feel for how easy it is to implement ScriptX by adding simple javascript to your existing website pages, we invite you to follow the steps below using your browser of choice.

If you are an existing user of ScriptX.Add‑on (formerly known as ScriptX) you may want to go straight to Step 3 - Install ScriptX.Services for Windows PC to see how easy it is to convert your organisation's existing ScriptX web pages, removing the dependency on Internet Explorer as the browser.

Try our free HTML to PDF cloud printing service - no downloads or installation required

Many web pages can easily be upgraded to include a ‘Print to PDF’ facility using MeadCo's FREE cloud printing service. This is as simple as adding a reference to MeadCo's re-distributable javascript libraries and wiring up a Print button event handler.

Headers, footers, margins, orientation and paper size are now under your control. Try some different values in the form below and compare the PDFs produced by ScriptX.Services with what you get using the browser's Print... menu.

Print this page to PDF

+ Click here to reveal code - Hide code

The only javascript required to achieve this is:

Our comprehensive samples site provides coding examples for the entire ScriptX family

Click here to open our samples site in another browser tab.

Firstly we need to check that the samples site is correctly configured to use ScriptX.Services for Cloud.

  1. Click the Settings link Settings button to open the Print Provider Settings panel
  2. Click the “Cloud / On Premise” option
  3. Click the “Reset to default” button
  4. Click the “Use this server” button - a green tick Green tick should appear to indicate that that the samples site is able to communicate with the cloud service

Your settings will be stored for the next time you visit the site. The Print Provider Settings panel should now look like this:

Print Provider Settings panel

Click on Basic use in the list of sample sets on the left then The basic print features in the main pane to open the Basic features sample. This sample shows how header, footer and orientation can be controlled with simple javascript.

Clicking the right-hand side of the Print dropdown button Print dropdown button gives a number of options leading to various dialogs which show some of the wide range of printing and printer options that ScriptX puts under your control. The dialogs are created by a freely redistributable MeadCo javascript library.

Now click the Sample sets for Services link at the bottom-left to return to the main page. Click the link for the Advanced sample set Enhanced page layout then click the Techie *Everything* link on the right. Here you can experiment with all the print, printer and paper settings that ScriptX allows you to control.

Feel free to try the various samples and discover simple yet powerful scripting for ScriptX that makes use of our freely redistributable javascript libraries. Further details of these can be found in our Github pages.

The cross-browser evolution of ScriptX.Add‑on - controlled local printing of content from any mainstream browser

Please note: As you are not reading this guide on a Windows computer you are not able to install the local ScriptX.Services for Windows PC server. However there is no client dependency on Windows, so ScriptX.Services for Cloud or ScriptX.Services for On-Premise Devices will allow printing from the browser on a non-Windows computer or device.

Developers have the choice of using the javascript client libraries we provide or calling the web API of a ScriptX.Services server directly

The ScriptX.Services server, whether in the cloud or installed locally, exposes a simple API that can be called directly.

MeadCo's javascript client library ScriptX.Print.Client wraps calls to this API with a simple object model that handles licensing and gives access to page and printer settings. This makes the job of migrating an existing ScriptX-enabled website very straightforward (see Step 5) but in many cases, such as where a known local printer is targeted or where a website uses a framework such as React, Angular or Vue.js, direct calls to the API will be more appropriate.

Calling the API directly removes the need to refer to our javascript libraries and the overhead of loading them.

Here is an example of printing an HTML fragment to a known local printer using an instance of ScriptX.Services for On-Premise Devices installed on an intranet (assumes jQuery is loaded):

An OpenAPI description of the ScriptX.Services API can be found here, and a full technical reference is also available here. Both of these documents include functionality to test calls to the API directly from the page.

Using our javascript libraries, existing web sites using ScriptX.Add‑on can be enhanced with ScriptX.Services to deliver an enhanced printing experience to any browser.

When used in conjunction with our ScriptX.Add‑on wrapper library MeadCoScriptXJS, the ScriptX.Print.Client library enables a web page to switch seamlessly between ScriptX.Services and ScriptX.Add‑on for Internet Explorer, depending on the user's browser.

In other words, migration of your website from ScriptX.Add‑on to ScriptX.Services is quick and easy, and users of your existing, functioning ScriptX‑enabled website will no longer be restricted to Internet Explorer.

If your organisation already uses ScriptX.Add‑on, please take a look at the section devoted to maintaining investment in current code which discusses a worked-through example of converting a web page from ScriptX.Add‑on to use both ScriptX.Services and ScriptX.Add‑on if available.