Handing ctrl-p in ‘factory’ emulation for ScriptX.Services back to developers

The MeadCo ScriptX.Services Client Library emulation of the “factory” object includes a “keydown” event listener that handles the use of ctrl-p to start a print using ScriptX.Services rather than with the browser UI. Along with overriding window.print() and any on-page UI this helps ensure the user always has printed output as described by the developer.

This is fine, and useful except that developers could not change this behaviour to, for example, completely disable printing using ctrl-p.

Version 1.7.2 of MeadCo ScriptX.Services Client Library allows developers to disable this behaviour in one of two ways:

  1. Add the atrtibute/value data-meadco-ctrlp="false" to any element that is parsed before the ScriptX.Services Client Library modules run. For example, add to the script element that is already carrying atributes such as data-meadco-server. This attribute/value prevents the event listener being added.
  2. In on page script remove the event listener with the script document.removeEventListener("keydown", factory.keyPressCtrlP);

In either case, any other desired behaviour can then be implemented.

Standardised web printing

with ScriptX.Services

ScriptX.Services is the only web printing software that can offer the level of control and flexibility required for consistent printing from different connected devices. We promise you’ll love it, try it now with a 60 day no obligation license.

Standardised web printing

with ScriptX.Services

ScriptX.Services is the only web printing software that can offer the level of control and flexibility required for consistent printing from different connected devices. We promise you’ll love it, try it now with a 60 day no obligation license.