Advanced use scenarios

The are a number of approaches to making use of Advanced ScriptX features enabled by a license applied to an application. These follow the pattern of those that might be used in javascript on a ScriptX enabled and licensed web page displayed in Internet Explorer:

  • Print a page displayed in a web browser control
  • Print a (html) document¬†downloaded from any arbitrary location
  • Print dynamically created html content

In each case, the full set of advanced and licensed features is available such as selecting a particular printer, setting the paper size and source, setting margins using specific measurement units.

Printing WebBrowser Control content

The WebBrowser control displays the content of a web page on the suface of the application. The content displayed can be printed by injecting ther ScriptX Factory object into the page and then calling ts properties and methods to print the page. See printing webbrowser control content for more details.

The PrintHtml() method

The nice thing about PrintHtml() is you can use it to provide really rich reports/output from information gathered from the user and you can do this in one of two ways:

Dynamically created content

Create a rich html 'document' on the fly and print it. See printing dynamically created content for more details.

Content from a web service

Call a 'web service' (one based on a REST API returning responses to GET requests, not SOAP) that returns the html document to be printed. See printing content from a web service for more details.

 

::> Printing webbrowser control content