ScriptX logotype
  • Home
  • Pricing
  • Applications
  • News
  • Documentation
Free Trial Downloads

How to deploy a license for ScriptX.Services For Windows PC

Discover a better way to print
  • Consistent browser-based printing, every time
  • Centralised control of print settings
  • Increase productivity and eliminate wastage
  • Easy to install and highly customisable
  • Fast and reliable, 24/7 customer support
  • Home
  • Pricing
  • Applications
  • News
  • Documentation
Developers ›  Knowledge Bank ›  How To Guides ›  ScriptX.Services ›  License Deployment ›  Evaluation License

ScriptX.Services for Windows PC License Deployment

This page is all about how to deploy and use the ScriptX.Services evaluation license. After a successful evaluation, deployment of your own license is very similar.

Please read all sections to familiarise yourself with the process and common issues you may encounter.

The license : 718450f1-0af3-4589-a81d-761b47499591

.. is the current evaluation license for ScriptX.Services and ScriptX.Addon.

This is revision 5 of the license and is valid from 10 June 2021 to 21 June 2022

and validates these root URLs:

  • scriptxprintsamples.meadroid.com
  • scriptxsamples.meadroid.com
  • www.meadroid.com
  • localhost
  • mhtml:file://

with these features enabled:

  • Advanced HTML Printing,  Direct/RAW Printing,  PDF Printing,  Enhanced HTML Formatting, 
Note

The url of interest for the evaluation license is "localhost". It enables you to fully evaluate all the features available with ScriptX with content served from a local server such as IIS Express, Node.js, Tomcat etc.

The other urls show where else we at MeadCo use this license and illustrate how a publisher license might look.

Also, this license will also work with ScriptX.Add-on for those users who will continue to use Internet Explorer 11 or IE Mode in new Microsoft Edge built with Chromium.

The license file

The license is provided in a file which needs to be downloaded, verified and cached by MeadCo Security Manager for ScriptX Services. The license has to be provided by every HTML page that uses ScriptX.Services for a controlled printing experience.

There is a choice as to where MeadCo Security Manager downloads the file from: MeadCo License Warehouse, or your own content servers.

  1. MeadCo License Warehouse

    Subject to there being no abuse of the facility and client PCs have access to the public Internet then the license can be downloaded from the MeadCo License Warehouse.

    This use is illustrated below.

  2. Self host

    Client PCs will download the file from your own content server(s). Access to the publiic Internet is not required

    The first job is to download the license file:

    After download, copy the license file to a suitable content folder on the server for your web application.

    For ease of system maintenance it is preferable to a have single current copy of sxlic.mlf located centrally. The file does not have to reside at a licensed address, simply, all client PCs must be able to access and download the file. Also see Recommended binary & license file location.

    We strongly recommend against renaming the file to, for example, include a revision number. Renaming will almost certainly cause issues in the future when the license is updated/renewed.

Referencing the license in code

For successful printing the license must:

  1. Be provided in full, i.e. the license file, to MeadCo Security Manager for ScriptX Services via the ScriptX.Services Licensing API before using any other APIs.
  2. Be referenced by its GUID (718450f1-0af3-4589-a81d-761b47499591) in each call made to ScriptX.Services APIs for printing (HTML, PDF or RAW).
Page license reference

The page license reference is the equivalent of including the MeadCo Security Manager for ScriptX.Addon on the page using an <OBJECT /> element.

For ScriptX.Services, the reference must be made in script by calling the ScriptX.Services Licensing API and it must be done before using any other APIs.

There are several ways that this can be done. If you wish to use the Service API directly, please see ScriptX.Services Licensing API

If you are using the MeadCo Client Libraries then there are two choices:

  1. Call the Licensing.apply() function

    or, as synchronous behaviour is deprecated in all browsers, use an asynchronous connection to the server with a callback function to be called when the server connection is completed. Asynchronous initialisation does not block the browser UI.

    The value "warehouse" means the license will be downloaded from MeadCo's license service. Alternatively, provide a valid fully qualified, not relative, url to the location of the license file (sxlic.mlf).

    If you are using Orchestrator for ScriptX.Services to resolve port conflict problems then this should be configured before attempting to connect and apply the license by specifying the port in use by Orchestrator:

    Or,

  2. Use attribute values. The first example assumes you have included the libraries in your app, the second assumes use of a CDN.

    <script src="/scripts/MeadCo.ScriptX/meadco-secmgr-1.11.0.js"
        data-meadco-server="http://127.0.0.1:41191" 
        data-meadco-orchestrator="41190"
        data-meadco-license="{718450f1-0af3-4589-a81d-761b47499591}"
        data-meadco-license-path="warehouse"
        data-meadco-license-revision="5"
        data-meadco-syncinit="true">
    </script>
    

    Or, as synchronous behaviour is deprecated in all browsers, use an asynchronous connection to the server:

    <script src="//cdn.jsdelivr.net/npm/scriptxprint-html@1.11.0/dist/meadco-scriptxservices.min.js"
        data-meadco-server="http://127.0.0.1:41191" 
        data-meadco-orchestrator="41190"
        data-meadco-license="{718450f1-0af3-4589-a81d-761b47499591}"
        data-meadco-license-path="warehouse"
        data-meadco-license-revision="5"
        data-meadco-syncinit="false">
    </script>
    
    data-meadco-server
    The url to the ScriptX.Services for Windows PC server. Typically this value is http://127.0.0.1:41191
    data-meadco-orchestrator
    Default is Orchestrator is not in use. If you are using Orchestrator for ScriptX.Services to resolve port conflict problems provide the port in use by Orchestrator.
    data-meadco-license
    The unique MeadCo publishing license provided by MeadCo. The presense of this attribute signals to the library that ScriptX.Services for Windows PC is being used, rather than for Cloud or for On Premise Devices.
    data-meadco-license-path
    The location of the license file (.mlf). The special value "warehouse" signifies the license should be downloaded from the MeadCo Licenses store on the public internet (https://licenses.meadroid.com ). Alternatively, provide a valid fully qualified, not relative, url to the location of the license file (sxlic.mlf)
    data-meadco-license-revision
    The current revision of the license. If this value is later than the currently cached license the the download will be forced - in otherwords this is the means to ensure a valid updated license is used.
    data-meadco-syncinit
    Default true. If false then asynchronous calls are made to the server to verify and if required download and cache the license.
    data-meadco-reporterror
    Default true. Only applies to synchronous initialisation. If false then any errors that occur when appliying the license are not reported.

    If you are using Orchestrator for ScriptX.Services to resolve port conflict problems then this should be configured with an additional

API license reference

If you are or intend using the MeadCo Client Libraries and have initialised them as described above then all API calls to ScriptX.Services will use the required authorisation headers that include the license GUID.

If you are or intend using your own code to make the AJAX API calls then you must add an Authorisation header to each call. For example:

headers = { "Authorization" : "Basic " + btoa("718450f1-0af3-4589-a81d-761b47499591" + ":") };

See Web Service API Reference for more details.

The application installer

The ScriptX.Services for Windows PC application must be installed on each Windows x64 PC on which a controlled print experience from any browser is required. Windows 10 and Windows 11 are supported.

The latest version of ScriptX.Services for Windows PC is: 2.16.0.38. We always recommend keeping up to date with the latest version to ensure the continued secure and issue free experience for users.

In order for the installers to run administrator rights are required.

 

Helpful articles and samples

If a PC will be shared among several users and multiple users may be signed in concurrently then please consider installing Orchestrator for ScriptX.Services for Windows PC.

In these circumstances Orchestrator can offer considerable benefits.

The following articles discuss and illustate how to use ScriptX.Services in your code.

  • How to code with ScriptX.Services for Windows PC
  • How to install ScriptX.Services for Windows PC
  • A discussion and workthrough for migrating from ScriptX.Addon to ScriptX.Services
  • A no frills sample of code for ScriptX.Addon and ScriptX.Services using common advanced features.
  • Discussion and tips on debugging use of ScriptX.Services for Windows PC.

Finally, remember our samples. These are built to latest HTML standards, use the MeadCoScriptXJS simple wrapper library and illustrate most things that are possible with ScriptX (customers do keep coming up with new and imaginative ways of using it too!). Feel free to examine the source to all samples and copy any code that is of use to you.

Potential problems

This section describes problems you may encouter and how to resolve them. If you canot resolve an issue then please contact our support team via email. All licensees are entitled to unlimited email based support for the duration of license.

Issues may occur when trying to provide the license to MeadCo Security Manager for ScriptX Services via the ScriptX.Services Licensing API and will be either:

  1. There was a problem downloading the license.
  2. The license could not be verified and validated.
  3. The license is being used in an invalid context.

To debug, open developer tools for your browser (F12) and use the Network pane to log the calls being made to the ScriptX.Services for Windows PC server. Locate the API call (typically "http://localhost:41191/api/v1/licensing") and inspect the response. Any code libraries in use, or your own code, may be reflecting error responses to the UI or console but inspecting the actual response value will remove any doubt about the original error response.

Issues with download
Error Description/advice
The system cannot locate the object specified This error usually occurs when a bad location/name is given for the license file, in other words the value of the "path" parameter is wrong. To trouble shoot this, try navigating to the value used (adjusting for relative values) and ensure that the file is downloaded by the browser.
Unspecified error

If using the MeadCo License Warehouse to deliver license files to users, the most likely cause of this error is the GUID parameter value is wrong; it should be: 718450f1-0af3-4589-a81d-761b47499591.

(for example data-meadco-license="718450f1-0af3-4589-a81d-761b47499591")

If using your own content server to deliver license files to users then this error indicates an issue has occured on the server.

Issues with license validation
Error Description/advice
Invalid HTML parameters specified for the license.

When working with the evaluation please note that the only valid domain is "localhost". If you are using "localhost" please contact us for additional assistance.

Issues with context

All licenses contain a list of domains/paths that are valid origins/locations for content wishing to use ScriptX features.

Error Description/advice
Unauthorized site, or invalid security zone. The origin of the content requesting to be licensed for using ScriptX.Services for Windows PC is not listed in the license.
  • Knowledge Bank
  • 'How To' Guides
    • ScriptX.Add-on
      • Introduction
      • Installing ScriptX on client PCs
      • Basic printing with ScriptX
      • Advanced printing features
      • Backwards compatibility
      • How to check if ScriptX is installed
      • MeadCoScriptXJS Library
      • License deployment
      • Client-side printing samples
    • ScriptX.Services
      • Introduction
      • Getting started
      • Maintaining investment in current code
        • Stage 1: Adding UI
        • Stage 2: Printing with ScriptX.Services
        • Stage 3: Summary and review
        • Stage 4: Error reporting
        • Stage 5: Prompted printing
        • Stage 6: Preparing for advanced uses
        • Stage 7: WaitForSpoolingComplete
        • Stage 8: Recommendations for some common issues
      • MeadCoScriptXJS Library
      • Printing with the API
      • Installing ScriptX.Services
        • For Windows PC v1
        • For On Premise Devices hosted on Windows Server v1
        • For On Premise Devices hosted on Windows 10 v1
        • Configure options For On Premise Devices v1
        • Cloud
      • Orchestrator
      • Debugging
      • License deployment
        • For Windows PC
        • For On Premise Devices
      • Samples
        • Configure for Windows PC
        • Configure for On Premise
        • Configure for Cloud
    • Security Manager
      • Deploying a license or revision
  • Technical Reference
    • ScriptX.Add-on
      • factory
        • baseUrl
        • ComponentVersionString
        • IsUniqueIDAvailable
        • OnDocumentComplete
        • relativeUrl
        • ResetUniqueID
        • ScriptXVersion
        • SecurityManagerVersion
        • Shutdown
        • UniqueID
      • printing
        • AddPrinterConnection
        • BatchPrintPDF
        • BatchPrintPDFEx
        • bottomMargin
        • collate
        • copies
        • currentPrinter
        • DefaultPrinter
        • disableUI
        • duplex
        • duplex2
        • EnumJobs
        • EnumPrinters
        • footer
        • GetJobsCount
        • GetMarginMeasure
        • header
        • headerFooterFont
        • IsSpooling
        • IsTemplateSupported
        • leftMargin
        • onafterprint
        • onbeforeprint
        • onbeforeunload
        • onpagesetup
        • onuserpagesetup
        • onuserprint
        • onuserprintpreview
        • orientation
        • OwnQueue
        • pageHeight
        • PageSetup
        • pageWidth
        • paperSize
        • paperSource
        • paperSource2
        • portrait
        • Preview
        • Print
        • printBackground
        • printer
        • PrintHTML
        • PrintHTMLEx
        • PrintPDF
        • PrintSetup
        • printToFileName
        • RemovePrinterConnection
        • rightMargin
        • SetMarginMeasure
        • SetPageRange
        • SetPreviewZoom
        • SetPrintScale
        • Sleep
        • templateURL
        • topMargin
        • TotalPrintPages
        • unprintableBottom
        • unprintableLeft
        • unprintableRight
        • unprintableTop
        • WaitForSpoolingComplete
      • printerControl
        • attributes
        • Bins
        • Forms
        • isLocal
        • isNetwork
        • isShared
        • Jobs
        • location
        • name
        • Pause
        • port
        • Purge
        • Resume
        • serverName
        • shareName
        • status
      • Job
        • Delete
        • Pause
        • Restart
        • Resume
      • enhancedFormatting
        • allFooterHeight
        • allHeaderHeight
        • allPagesFooter
        • allPagesHeader
        • extraFirstFooterHeight
        • extraFirstPageFooter
        • firstFooterHeight
        • firstHeaderHeight
        • firstPageFooter
        • firstPageHeader
        • pageRange
        • printingPass
      • rawPrinting
        • printer
        • printDocument
        • printString
    • ScriptX.Services
      • Web service API
        • Service Description
          • (GET)
        • Licensing
          • licensing (GET)
          • licensing (POST)
          • licensing/ping (GET)
        • PrintHtml
          • settings (GET)
          • deviceinfo (GET)
          • htmlPrintDefaults (GET)
          • print (POST)
          • status (GET)
          • download (GET)
          • canceljob (PUT)
        • PrintPdf
          • print (POST)
          • status (GET)
          • download (GET)
        • PrintDirect
          • print (POST)
    • Security Manager
      • How it works
      • License Expiry
      • Testing for a valid license
      • About the license file (.mlf)
        • LICENSE
        • APPLICENSE
        • TITLE
        • DOMAINS
        • DOMAIN
        • PERMISSION
      • API
        • Apply
        • License
        • result
        • validLicense
  • Articles
    • Dialogs with ScriptX.Services
 
ScriptX logotype
Home Pricing Applications News Contact us Documentation

© 2022 Mead & Co Limited.

Privacy and cookie policy

E: feedback@meadroid.com
Follow us:
LinkedIn   GitHub
X

Warning:

This ScriptX.Add-on sample can only be viewed using Internet Explorer.