ScriptX Printing Samples

The ScriptX printing samples provide exemplar implementations and discussion of the techniques available for controlling the printing experience within Internet Explorer using ScriptX in a wide variety of interesting scenarios.

Note: The first time you access a sample you may be asked to accept the version of the ScriptX software you chose; you must be logged on to your Windows 2000 or Windows XP workstation as an administrator to permit the installation.

You may also be requested to accept this site's evaluation publishing license.

Setup

The samples are available:

Using your currently installed version [(Unknown)Discover
Using the latest test code [v8.0.0.45]
Using the latest hot fixes [v7.7.0.20]
Using the current release code [v7.7.0.20]
Using one of the other available codebases: v

Note that any currently installed version cannot be downgraded, only upgraded.

Open samples in:  this window,  a new window,  new window for each

You are using a Unknown browser. Please note that the ScriptXtra plug-in will be required to use these samples.

This page is displayed in your native browser, the samples will be displayed using ScriptXtra and you should see the experience is seamless.

Version: 4.2.2.29994, 29 November 2016 16:39

Basic

Illustrates the straightforward use of the freely distributable basic ScriptX printing functionality to set page headers and footers, paper orientation.

'Wide' Basic'

Illustrates the straightforward use of the freely distributable basic ScriptX printing functionality. The page to be printed is very wide - this sample illustrates the new 'Scale to fit' functionality that will be available as standard with IE7 and ScriptX makes available to IE5.5 and IE6 users. The sample also illustrates changing the template type in use.

ScriptX with frames

Provides a discussion of using ScriptX with framesets including printing of individual frames.

Note that the structure of the html document for this sample does not work with IE 10 or later standards mode so the document mode will be set to IE9 standards mode in these cases.

Always IE 7 Template

Illustrates the use of the freely distributable ScriptX printing component to provide the IE 7 printing experience on all versions of IE from v5.5 onwards. No scripting is used to alter headers and footers etc.

Header and Footer Font

Illustrates scripted control of the font used to print the document header and footer. User/scripted defined fonts for headers and footers requires Internet Explorer 8 or later and ScriptX 6.5.439 or later.

ScriptX Installed Version Information

Illustrates how to obtain the version of ScriptX installed on a machine - this sample will not attempt to install a new version of ScriptX or upgrade any current installation.

Main Features

Advanced

Illustrates the typical use of ScriptX advanced printing functionality for which a publishing license is required.

Techie

An all-in-one technical example illustrating the most advanced use of licensed ScriptX functionality.

Reports

Provides a discussion of printing customised documents and reports with ScriptX and a number of samples of differing techniques. A mix of free and licensed functionality is used; the licensed functions provide an improved user experience..

Printer connections (requires v7.1 or later)

AddPrinterConnection and DeletePrinterConnection allow connections to be made to printers that are shared on the network but may not be in the users installed devices.

Printer control

Illustrates the use of the printerControl, Jobs and Job objects.

Direct (raw) printing (requires v6.3.436 or later)

Discusses sending data directly to the printer in scenarios such as sending ZBL commands to a Zebra Label printer or control code sequences to label printers.

Note: Direct printing is a cost-option which can be enabled on a 'standard' client-side license for an additional fee of $500.

Printing PDF Files (v7.1 or later)

Discusses printing of Adobe Acroobat PDF files using the new features available in ScriptX Corporate Edition 7.1 and later.

Note: Enhanced PDF printing is a cost-option which can be enabled on a 'standard' client-side license for an additional fee of $500.

Print client side generated HTML

Illustrates creating an html document on the client as a javascript string and then printing that html.

PrintHTML callbacks (requires v7 or later)

The PrintHTML API provides for queueing and printing of html documents in the background. ScriptX 7 and later adds the PrintHTMLEx API that provides callbacks on the progress of each job, allowing monitoring and error checking.

Working with frames

Frame (iframe) preview

The 'Wide' Basic sample but licensed, so conferring the ability to preview iframed content. This requires the use of the IE 7 style template.

ScriptX with frames

Provides a discussion of using ScriptX with framesets including printing of individual frames. This sample also illustrates previewing a frame.

Note that the structure of the html document for this sample does not work with IE 10 or later standards mode so the document mode will be set to IE9 standards mode in these cases.

ScriptX within a frame in frameset

Provides a discussion of using ScriptX with framesets where a particular individual frame is to be printed/previewed and ScriptX is placed on the document within the frame rather than the top most frameset document. This sample includes using MaxiPT.

Please note that this sample does work with IE 10 and laters standards mode.

ScriptX within an iframe

Provides a discussion of using ScriptX where a particular individual iframe is to be printed/previewed and ScriptX is placed on the document within the (i)frame rather than the top most frameset document. This sample includes using MaxiPT.

Controlling margins, printing and previewing frames

In an international environment there may be a mixture of margin measurement units - this sample sets margins in the opposite units to your default illustrating that with ScriptX you gain control of the units for specifying measurements. This sample also illustrates the scaled to fit preview and printing of a frame.

Enhanced formatting (requires v7 or later, IE 8 or later)

Enhanced formatting provides for finer control over the headings and footers by allowing HTML snippets to be used, and for an enhanced page range specification.

Note: Enhanced formatting is a cost-option which can be enabled on a 'standard' client-side license for an additional fee of $500.

Headers and footers

Illustrates the use of multi-line HTML headers and footers.

Page ranges

This sample shows the use of enhanced page range specification; the ability to print arbitrary ranges of pages (rather than a single range) and print only odd, only even or both odd and even numbered pages.

Techie

An all-in-one sample by which you can explore the effect on output of each of the enhanced formatting options. This sample starts with example enhanced headers and footers filled in.

Blank Techie

An all-in-one sample by which you can explore the effect on output of each of the enhanced formatting options. This sample starts without any example data.

Queued printing (requires 7.0.18.1 or later)

This sample shows the use of enhanced formatting with the queued printing method printHTML().

Interactive report selection and dynamic enhanced formatting

A 'walk-thru' demo illustrating ScriptX Enhanced Formatting HTML header and (in this case, hidden) frame printing capabilties all wrapped in a modal dialog window.

Miscellaneous illustrations

Automating preview

Illustrates calling for a preview during the initialisation of the page taking the user straight to the preview from which they can then print.

Use of OwnQueue

Provides a discussion of the usage of the OwnQueue() method with the printHtml() method for printing reports.

ScriptX Events

ScriptX fires a number of events, such as when the user chooses print preview and when printing has completed. This short article illustrates each of these events.

Printing the selection or range of pages

Discusses the SetPageRange() method that provides for printing only the selected content, or a range of pages.

Preview Zoom (requires ScriptX 6.3.435 or later)

Illustrates setting a custom zoom factor for print preview.

Print scaling (requires ScriptX 6.3.435 or later)

Illustrates specifying the print scaling to use. This requires the IE 7 style template and enables overriding the default of 'scale to fit'/100%.

Determining the number of pages to be printed (requires v7 or later)

Illustrates obtaining the totalPrintPages property.

Persistent unique identifier (requires ScriptX 7.1 or later)

Illustrates using the persistent Unique identifier.

Please note that the MaxiPT samples always use Quirk-mode, standards modes are not supported.

Feature Set #1 - scripted control

Illustrates the use of HTML headers and footers and all other functions of MaxiPT Feature Set #1. The required settings are made via on page script.

Feature Set #1 - control by css

Illustrates the use of HTML headers and footers and all other functions of MaxiPT Feature Set #1. The required settings are made by css style rules.

Optimal layout

Illustrates the use of the Optimal Layout function of MaxiPT Feature Set #2.

Frame preview

Illustrates the use of the Frame preview function of MaxiPT Feature Set #2 - please note that this facility is now also available as a licensed function when using the IE 7 style template with ScriptX.

Scaling

Illustrates the use of the Scaled printing function of MaxiPT Feature Set #2.

Frames

Illustrates the MaxiPT template being used with frames and allows comparison with the 'standard' templates.

ScriptX within a frame

Provides a discussion of using ScriptX with framesets where a particular individual frame is to be printed/previewed and ScriptX is placed on the document within the frame rather than the top most frameset document. This sample includes using the standard templates, MaxiPT is the default.

These samples are specific to Internet Explorer 9 or later and require v6.6 or later of ScriptX.